Dec 08, '03 11:07:00AM • Contributed by: leenoble_uk
Trying out the AppleScript UIscripting in Panther? Me too. Having trouble getting Windows Media Player to accept any form of automatic control, I resorted to using keystrokes. However, using this ...
keystroke "Q" using command down... resulted in the dialog box asking if I really wanted to quit all my running applications and log out! It turns out that UIScripting treats the uppercase Q as if you had also issued the 'shift down' command. To get around this, you must write this line as:
keystroke "q" using command downIt may seem obvious now, but remember that the shorcuts in all menus are presented in uppercase, but do not require the user to hold down shift. Perhaps Q is not the best example, but it's something to be aware of if you experience odd behaviour with keystrokes.