Benches macOS

1

Pause/Resume Actual AppleScript

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

So I have built an apple script to submit websites for me, basically it fills out all the information in the form and then submits it.

But what if there is an error, the form changed or something and I need to pause the applescript? Is there anyway to do this?

I would love to build an AppleScript controller that always stays on top when the script is running, that has a pause button or even a keystroke routine that would allow me to pause and then resume.

Anyone have any ideas?

1 reply

Sign in or join Beachball Help to reply.

  1. 0

    nate12345

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This is far from ideal, but:

    At every new part of the script (or as often as you feel is necessary) you could put in code like this:

    display dialog "Continue or Pause?" with title "Continue/Pause" buttons {"Pause", "Continue"} default button 2
    if button returned of result is "Continue" then
    else if button returned of result is "Pause"
    display dialog "Play?" with title "Play" buttons {"Play"} default button 1
    end if

    That way, you press Return to keep going, or click Pause to stop.

    I know this isn't the best way, but I can't think of something better.

    Good luck!

    -Nate