Applescript for menu items (error -1719)
Disclaimer: I've got no idea what I'm doing... I put this applescript together based on trial and error and some stuff I found on the internet
So I've been trying to put together an applescript to string together two menu commands that I use in a program called "FlySketch". This is the script:
tell application "FlySketch"
activate
end tell
tell application "System Events"
tell process "FlySketch"
tell menu bar 3
click menu item "Screen Snapshot Background"
end tell
tell menu bar 3
click menu item "Copy"
end tell
end tell
end tell
When I run it, I get this error:
error "System Events got an error: Can’t get menu bar 3 of process \"FlySketch\". Invalid index." number -1719 from menu bar 3 of process "FlySketch"
Can't tell what's going wrong... I emailed the developer and he didn't seem to know why it wasn't working either.
Any thoughts?
Unibody MBP, Intel iMac, Mac OS X (10.6.3), 15" Unibody MBP (2.53 GHz Core 2 Duo/4GB/512 MB 9600M GT), iMac