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


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 | # ]