I have a small applescript in Automator:
do shell script "osascript ~/Focus-On.scpt"
delay 60
do shell script "osascript ~/Focus-Off.scpt"
Basically, i want to execute the first shell script, then, after a minute, the second one.
But Automator executes both without any delay. How to fix it?
Try the load script way, this works on my machine:
set homeFolder to path to home folder as text
set scriptOn to load script alias (homeFolder & "Focus-On.scpt")
run scriptOn
delay 60.0
set scriptOff to load script alias (homeFolder & "Focus-Off.scpt")
run scriptOff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With