FAQ: Scriptable Button Palette

Question

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

Answer

 

The Button Palette

The Button Palette is a new feature in SmartCapture 2. By default a palette of 10 buttons is created at at the top of the screen when you start SmartCapture 2. Each button may be configured to run a script.

The inital assignments to the buttons are:-

  • Button 1: Display a list of all the button assignments - (you can pick & run from this list)
  • Button 2 to 7: No assignment - Try assigning your own scripts!
  • Button 8: Batch Capture
  • Button 9: Thick Sections
  • Button 10: Time Lapse

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 1 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.

To prevent the button palette from being created, rename the "Buttons" folder to something else say "Disabled 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 fuction 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 witth 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