Jump to content

How do I get my workflow to wait for a pop-up window to appear?

Recommended Posts



I have a workflow that I'm working on which basically switches git branches, runs a series of command line instructions and then needs to wait for a pop-up window to appear so that I can enter a password and press continue.


I'm not sure how to accomplish the part where the workflow waits for a pop-up window to appear.  Is this possible?

Link to comment


The pop window is generated in a part of my workflow where I run the terminal command `make bootstrap`.  It pops up a window as seen below.


I want the workflow to know when this pop up has appeared, fill the password and click "OK".



Edited by jswifty
Link to comment
1 minute ago, jswifty said:

where I run the terminal command `make bootstrap`.


And how are you running it in your Workflow? If you call it in a Run Script Action, it should halt execution until that command returns (exits). Unless your command returns immediately? What happens when you run it in a terminal, are you back at the command prompt before that dialog disappears? If so, that’s what you need to fix: you need to make it so however you’re invoking the dialog, does not exit before it is gone.


open with the -W flag maybe of help (check man open).

Link to comment



I've attached a screenshot below of how I've set it up.


The terminal command is running the actual command, then I wait 30 seconds while the commands are running and the pop-up window appears.  Then, I copy the password to the clipboard and paste it into the active textbox, then click enter using an apple script.


The problem is I want to be able to know if that pop up has appeared rather than waiting 30 seconds and assuming it's there.


How do I do that?



Link to comment
1 minute ago, jswifty said:

The terminal command is running the actual command


Do it in a Run Script instead, as suggested above. You don’t need to launch iTerm, either. Also, avoid Run NSAppleScript and prefer instead another Run Script with Language set to /usr/bin/osascript (AppleScript).

Edited by vitor
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...