Applescript - creating a simple script
Hi all,
I am new to using Applescript, and cannot figure out how to create what I think must be a super simple script.
What I want to happen is:
An online tool is already open in Google Chrome, I am in the first text field. I need the following shortcuts to be repeated. Command - Shift - "S", and then with a little delay Command - Enter. And then start again. Would be great to have a 'start' and 'end' command added too.
That's what I have so far:
activate application "Google Chrome"
tell application "System Events" to keystroke "s" using {command down, shift down}
delay (random number from 0.5 to 5)
tell application "System Events" to keystroke "enter" using {command down}
delay (random number from 0.5 to 5)
end
I only managed to get the first set of shortcuts right. After that a new window of Chrome opens.
I tried a bunch of forums, but could not find any solution. Can anyone help? Thanks!!
MacBook