Trying to come up with an AppleScript that will press Function and Enter together...
The script I have so far is:
tell application "Vuze" to activate
tell application "System Events"
tell process "Vuze"
keystroke "u" using {command down}
keystroke "v" using {command down}
key code 65535 using keystroke return
end tell
end tell
I looked up the key code for the function key, and 65535 is what came back. The start of the script is grabbing some data from a text file and copying the contents. It is then pasting the contents into Vuze (which is where the Command V comes from.
The script pastes the data correctly into the window that pops up (when you press Command U). Problem is, when I press Funtion + Return together, it selects "Ok" which is on the window and the problem is solved. When I attempt to get the script to do it it just keeps repeating itself over and over again and not once does it select Ok.
Thoughts?
The script I have so far is:
tell application "Vuze" to activate
tell application "System Events"
tell process "Vuze"
keystroke "u" using {command down}
keystroke "v" using {command down}
key code 65535 using keystroke return
end tell
end tell
I looked up the key code for the function key, and 65535 is what came back. The start of the script is grabbing some data from a text file and copying the contents. It is then pasting the contents into Vuze (which is where the Command V comes from.
The script pastes the data correctly into the window that pops up (when you press Command U). Problem is, when I press Funtion + Return together, it selects "Ok" which is on the window and the problem is solved. When I attempt to get the script to do it it just keeps repeating itself over and over again and not once does it select Ok.
Thoughts?