Re: trouble scripting Automator
Re: trouble scripting Automator
- Subject: Re: trouble scripting Automator
- From: "Timothy J. Wood" <email@hidden>
- Date: Fri, 3 Jun 2005 09:33:00 -0700
On Jun 3, 2005, at 9:24 AM, Ari Bader-Natal wrote:
I'm having trouble scripting Automator. The application's
Applescript dictionary seems to allow
for dynamically building workflows, but I keep getting stuck when
attempting to add actions to it.
Has anyone successfully written an applescript that successfully
builds a workflow?
Yes; I've gotten this to work, but there are definitely some rough
edges. Here is the source to the AppleScript portion of one of our
automated test scripts for OmniOutliner 3. This tests our Automator
action by building a workflow with that component, setting some
parameters on it and invoking it (not shown here is where we do the
value replacement of the <<...>> strings or where we compare the
output and such).
tell application "Automator"
set MyWorkflow to make new workflow
set MyPrototypeAction to Automator action "New Outline File"
add MyPrototypeAction to MyWorkflow -- NOTE: This
instantiates the action added; so we need to get the added action below!
set MyAction to last Automator action of MyWorkflow
set value of setting "baseFolder" of MyAction to
"<<POSIX_OUTPUT_DIR>>"
set value of setting "baseName" of MyAction to "<<TEST_NAME>>"
execute MyWorkflow
close MyWorkflow without saving
end
I've logged a couple Radars on this and I encourage you all to log
any problems you find.
-tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden