I'm new to AppleScript, and am just diving into UI Scripting. I'm attempting to create a script for the program TypeIt4Me, which is a menu bar utility (text expansion) that has no AppleScript support.
My proposed script would utilize System Events to click its menu bar icon, type down five times, right once, and Return. However, AppleScript pauses for a long time between clicking the icon and performing the first keystroke, to the point that this is impractical as a script. Below is the version that has the first click and one down press.
tell application "System Events"
click menu bar item 1 of menu bar 2 of application process "TypeIt4Me"
key code 125 -- ie "down"
end tell
Could this be a problem with my code? A setting somewhere? AppleScript in general? Thanks.