using QuickKeys and AppleScript with ImageJ on Mac to launch a plugin?
using QuickKeys and AppleScript with ImageJ on Mac to launch a plugin?
- Subject: using QuickKeys and AppleScript with ImageJ on Mac to launch a plugin?
- From: Bill Christens-Barry <email@hidden>
- Date: Wed, 14 Feb 2001 19:07:54 -0500
Has anyone used QuickKeys and AppleScript with ImageJ on a Mac to
launch a plugin? The following script (together with a QuickKeys
macro that is trained to select a plugin from the plugins menu when
it sees the key combo shift-command-D) is giving me lots of errors
from ImageJ:
tell application "ImageJ"
activate
end tell
tell application "Finder"
TypeText "D" with Command and Shift
end tell
This script uses the 'Typetext' scripting addition from Sandi's
Additions to mimic keyboard input, which then should launch the
QuickKeys macro. What I get is the following errors from ImageJ:
AWT caught exception handling window update:
java.lang.ArrayIndexOutOfBoundsException: -1
at
com.apple.mrj.internal.awt.MacKeyboard.mac2awtKeycode(MacKeyboard.java
)
at com.apple.mrj.internal.awt.MacKeyboard.handleKeys(MacKeyboard.java)
at com.apple.mrj.internal.awt.VFramePeer.handleKeys(VFramePeer.java)
at com.apple.mrj.internal.awt.ViewFrame.handleKeys(ViewFrame.java)
If I launch ImageJ from the Finder and then launch the QuickKeys
macro using shift-command-D, everything works fine. I tried putting
the 'Typetext' command inside the tell ImageJ block, but this didn't
work. Any clues here?
Are there alternatives that would allow me to get beyond ImageJ's
lack of scriptability beyond the required suite? As usual, I'd love
to see examples if anyone has conquered this.
Thanks.
Bill Christens-Barry
...........................................................
.........*..................................*...........
......*......Bill Christens-Barry.....*......
.....*............................................*.....
......*email@hidden.......*.......
.........*..................................*...........
...........................................................