can you send keystrokes of the F keys?
No, you cannot keystroke function keys through applescript as is. There might be a workaround though. What function are you trying to script?
the F key shortcut was to be used from Quark as a workaround for something that cannot be scripted (updating modified images)
i guess this is a loose loose situation
I pretty sure you can send F-Key strokes using applescript!
tell application "System Events"
tell application "VNCThing" to activate
key code 96 -- Send F5 to VNCThing so IE refreshes the page
As pointed out by Bruce Phillips in another thread, you can determine key codes with Full Key Codes.
Oh thanks a lot, Brontojoris
That works perfectly. I was completely unaware of key codes
F1 = 92
F2 = 93
F4 = 94
F15 = 106
Is there a list of other key codes around? specifically the TAB key?
Tab is ASCII 9
Keycode HEX 30
Keycode DEC 48
The best list of mac key codes I’ve found is here:
Silvermeteors is right, the list is not quite in order. I saved the link to my drive for quick reference.
Model: Dual 2.3GHz G5
AppleScript: 2.1.1/Script Debugger 4
Browser: Firefox 126.96.36.199
Operating System: Mac OS X (10.4)