How to synchronize to automator apps from applescript ?

Hi,
I have following applescript which launch 2 automator apps

Tell application "autoapp1"
	Launch
End tell

Tell application "autoapp_withGrab"
	Launch
End tell

Here when I run this script from editor it will launch both automator apps simultaneously,
that is what I don’t want to happen.

I want second app will be launch after first 1 is completed.
How it can be done in applescript?

Thanks in adv.
Ulhas

Hi ulhas,

I have not much experience with Automator (so far Otto and me did not become friends), but there is also a built-inshell command for executing Automator workflows that can be used from within AppleScript using «do shell script».

In order to use this command, you need to re-save your Automator apps as workflows (not as applications):


set wfpath to "DandyDisk:Users:martin:Desktop:test.workflow"
set qtdwfpath to quoted form of POSIX path of (wfpath)
set command to "automator " & qtdwfpath
set output to do shell script command

Here on my systems, using this technique results in workflows being processed one after each other.

Thanks Martin for quick reply,
i will try your solution and let u know.

Ulhas