wait for command line program execution before issuing new action in AppleScript -



wait for command line program execution before issuing new action in AppleScript -

i pretty new applescript. need script opens 3 iterm tabs , executes 3 command line programs respectively. first programme terminates, while lastly 2 run indeterminately.

here have:

tell application "iterm" activate set next (make new terminal) tell next activate current session launch session "default session" tell lastly session set name "vagrant-db" write text "cd ~/workspace/vagrant-db; vagrant up" end tell launch session "default session" tell lastly session set name "next/core" write text "cd ~/workspace/next" write text "/usr/local/bin/sbt \"project core\" \"run\"" end tell launch session "default session" tell lastly session set name "next/web" write text "cd ~/workspace/next" write text "/usr/local/bin/sbt \"project web\" \"~re-start\"" end tell end tell end tell

problem need wait first command line operation end (vagrant booting up) before issuing sec , third. there way it?

solved like

--first programme exec set 0 repeat until (a = 1) if (text of current session contains "ready") set 1 end if end repeat --second programme exec --third programme exec

applescript

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -