Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Launch one Automator workflow from another using Perl Apps
I spent quite a while trying to figure out how to launch a second Automator workflow based on a conditional in perl, and this was the best I could come up with. Basically, I set up my conditional in perl (as part of the initial Automator workflow, in the Run Shell Script action), and if that condition was true, it executed this command:
system ("open /Users/myuser/Desktop/sendit.app");
(sendit.app is my second "branch" Automator workflow application.) It's pretty obvious in the end, so it may not be much of a tip, but I couldn't find how to do this anywhere I was looking.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[6,454 views]  

Launch one Automator workflow from another using Perl | 3 comments | Create New Account
Click here to return to the 'Launch one Automator workflow from another using Perl' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Launch one Automator workflow from another using Perl
Authored by: mark hunte on Apr 22, '08 10:25:58AM
This works in 10.5, Run from a 'Perl' Run Shell Script


$name = "mark";

if ($name eq "Sarah") {
	print "Hello, Sarah";
} else {
	system("/usr/bin/automator -i \"Hello $name!\"  /Users/UserName/Desktop/test.workflow");
}

In the example above:
The -i option is the input option for the Automator workflow that will be called, and the "Hello $name!"
is the actual input.

The /Users/UserName/Desktop/test.workflow workflow file that is being called is a
Run Applescript Action



on run {input, parameters}
	
	
	set {TID, text item delimiters} to {text item delimiters, space}
	set input to text items of input as string
	set text item delimiters to TID
	
	display dialog input buttons {"Close"} default button 1 with icon 1 giving up after 30
	
end run

---
mh

[ Reply to This | # ]

Launch one Automator workflow from another using Perl
Authored by: Quatch on Apr 22, '08 11:25:24AM

I made a pair of self-calling automator applications for time lapse photography. If you save your workflow as an application, you can run it directly. I believe there was a hint about automator workflows vs applications recently too.



[ Reply to This | # ]
Launch one Automator workflow from another using Perl
Authored by: mark hunte on Apr 22, '08 01:40:42PM
You may be talking about this.
http://www.macosxhints.com/article.php?story=20080128102421712

I think the main point of this hint, is to call a workflow from Perl.

( Although for me, opening a application (.app) is not exactly opening a workflow (.worflow) As is the example I gave) :)




---
mh

[ Reply to This | # ]