FAQ: Scriptable Button Palette

Question

How do I create a Button Palette? How do I add Scripts to the Button Palette and Function Keys?

Answer

The following page covers Scripting, the User Button Bar and Function Keys for SmartCapture 2.1. If you are still using SmartCapture 2.0 refer to Scriptable Button Palette 2.0

The User Scriptable Button Palette can be created by switching to the "SmartCapture 2 Helper" application, and select "Create User Button Bar" from the "Features" menu. This will cause the following window to be created in SmartCapture.

The User Scriptable Button Palette

Each button may be configured to run a script. The first button is, by default, set up to list the scripts which are attached to the remaining nine buttons. The scripts can also be run from this list.

To assign a script to a button, place the script inside the 'Buttons' folder inside the 'Scripts' folder. Then rename your script so that it starts with a number from 2 to 10 e.g. "4 MyScript"

To remove a script from a button, simply remove the script from the 'Buttons' folder inside the 'Scripts' folder.

You can edit the script "Start Up" which is in the "Scripts" folder, to create the User Scriptable Button Palette every time the SmartCapture application starts up. You need to find the line:-

-- run script file ":Scripts:Setup Buttons DS"

and change it to:-

run script file ":Scripts:Setup Buttons"

Function, Keypad and Arrow Keys

The Function keys, Keypad and Arrow keys can be used to run Apple scripts.

To attach a script to a function key, place the script in the "Scripts" folder and rename the script "FK<n>" where <n> is the number of the function key.

E.g. "FK3" should be the name of a script that will run when function key 3 is pressed.

Summary of key names

 Name

Key

FK1 to FK15 function key 1 to function key 15
KP0 to KP9 keypad 0 to keypad 9
KPClear keypad Clear (Sometimes referred to as forward delete or NumLock on the iMac keyboard)
KPEquals keypad "="
KPDivide keypad "/"
KPTimes keypad "*"
KPMinus keypad "-"
KPPlus keypad "+"
KPPeriod keypad "."
LeftArrow left arrow key
Right Arrow right arrow key
UpArrow up arrow key
DownArrow down arrow key

You can assign a script to a modified key (a key pressed whilst either "Shift", "Control" and/or "Option" is held down) by:

  • Prefix script name with an "S" for the Shift modifier.
  • Prefix script name with an "O" for the Option modifier.
  • Prefix script name with an "C" for the Control modifier.

Note: When using more than one modifier prefix ("S", "O" and "C") the modifiers must be placed in the order "S", "O" and then "C", e.g. SOFK7 is the function key 7 with the Shift and Option key held down OSFK7 will not work.

E.g. to assign a script to function key 4 with the shift key, name your script "SFK4"

Examples
  • FK1 - function key 1
  • KP1 - keypad 1
  • OFK1 - function key 1 with the Option key held down
  • SKP4 - key pad 4 with the Shift key held down
  • SLeftArrow - The left arrow key with the Shift key held down
  • SOFK7 - Function key 7 with the Shift and Option key held down

 

Note: SmartCapture 2.0 is shipped with the numeric keypad assigned to up to 12 positions of filter wheel 1. The arrow keys are assigned to move the stage. If you alter these you can revert to the original assignments by using the SmartCapture installer and selecting only the "Function Key Assignments" to install.

 

Back to support page


©Copyright 2001 - Digital Scientific Limited

Page last updated on Friday 8 November, 2002 2:03 PM - Contact Us