I am testing applescripts that I will use later in my OSX app. I'm getting a 6 sec delay after the click button command below. After some research it seems that this is a known issue. What I find interesting is, if i use the commercial app QuicKeys to perform the same button click there is no delay, so I assume they found a work around. Anybody have any ideas?
tell application "System Events"
tell process "Pro Tools"
set frontmost to 1
click button "Track List pop-up" of window 1
-- 6 seconds delay before next command is sent
key code 36 -- return key stroke
end tell
end tell