I am looking to automate Copy, Paste, Tab and Left in Microsoft Excel and either Safari or Firefox using Applescript. I have limited experience in coding, and have recently complied a code, but unfortunately it doesn't work as planned...
What I want to happen;
- In Browser Copy
- In Excel Paste, Left, Copy
- In Browser Tab, Paste, Tab x8
- Repeat
repeat 50 times
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
keystroke "c" using command down
end tell
end tell
delay 0.3
tell application "Microsoft Excel" to activate
tell application "System Events"
tell process "Microsoft Excel"
keystroke "v" using command down
delay 0.3
key code 123
keystroke "c" using command down
end tell
end tell
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
keystroke tab
keystroke "v" using command down
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
keystroke tab
end tell
end tell
delay 0.3
end repeat