I seem to be having a problem with my AppleScript. I created a trigger in BTT to move a window to the right one space. It works 100% of the time manually typing the keyboard shortcut I linked it to but for some reason I can’t get it to work with this script below.
Is there something I’m missing here? Or possibly another way to do this?
set myfile to “/Users/Work/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents/Links/EOD.txt”
set eodUrl to read myfiledo shell script “date ‘+%d’”
set answer to result - 1tell application “Safari”
activate
open location eodUrl
delay 0.5
tell application “System Events”
key code 124 using {control down, option down}
end tell
end telldelay 4
repeat answer times
tell application “System Events”
key code 125 using option down
end tell
end repeat