Monday, July 23, 2018

#1 2005-11-07 09:53:50 am

avsa
Member
From:: rio de janeiro/paris
Registered: 2005-11-06
Posts: 6
Website

opening workflows in script editor

I can't program in applescript alhtought i have some programming skills in other languages and wold probably learn quick to. I want to pick a workflow I built in automator and tweak a little, to make some fine adjustements.

How can I see and edit the code in an automator workflow, or, how can I use automator to quickly create a applescript base to build my program around?

thanks

Offline

 

#2 2005-11-07 11:21:32 am

Kevin Wolfe
Member
From:: Cincinnati OH USA
Registered: 2005-10-27
Posts: 67
Website

Re: opening workflows in script editor

Avsa,

If I get your question right, you can't see the code of the actions. You can create a script that mimicks an action (with your tweaks) and use a Run AppleScript action to put it in.

I have a few here so you can see how they work with Automator: http://homepage.mac.com/jkevinwolfe/ott … page4.html

Offline

 

#3 2005-11-07 11:33:00 am

Adam Bell
Administrator
From:: Nova Scotia, Canada
Registered: 2005-10-04
Posts: 4663

Re: opening workflows in script editor

Kevin;

Why don't you list your great little bag of tricks (http://homepage.mac.com/jkevinwolfe/ott … page4.html) in the Automator section of MacScripter? You wouldn't have to download them all, just point them at your own site's URLs for downloading them as binaries. You have five there now, so showing the others should be quick and easy.

Adam Bell


iMac running OS X 10.13.1

Offline

 

#4 2005-11-07 12:43:57 pm

avsa
Member
From:: rio de janeiro/paris
Registered: 2005-11-06
Posts: 6
Website

Re: opening workflows in script editor

Thanks kevin but that's not exactly what I wanted. It's not running the applescript in automator, but opening an automator workflow as editable script.

See, althought I know how to program in other languages, I don't know the few basic grammars to get stared in applescript, so i guessed that instead of wasting time trying to figure out the exact place to put the {}  i could just do the basic in automator, export it to the script editor and from there start editing the code. Use automator to get introduced to applescript programming, and as a rapid prototyper, see?

Offline

 

#5 2005-11-07 02:23:27 pm

Kevin Wolfe
Member
From:: Cincinnati OH USA
Registered: 2005-10-27
Posts: 67
Website

Re: opening workflows in script editor

Avsa,

Seems like you're going the long way around. Revising the script will probably take longer than scripting it in applescript in the first place. However the real problem is that the workflow is not an applescript. It's an XML document. If you want to see it, control click on any workflow and choose "Show Package Contents", Open the Contents folder and drag the .wflow file into TextEdit.


Adam,

I don't know that binaries are the way to go. These are not working scripts, but all need to be pasted into the correct spot in a Run Applescript action. I could post a link here that points to this section of my Otto's Garage site. It's much easier to update that with my web software than to try to maintain it here.

Kevin

Offline

 

#6 2005-11-07 02:32:51 pm

Adam Bell
Administrator
From:: Nova Scotia, Canada
Registered: 2005-10-04
Posts: 4663

Re: opening workflows in script editor

Kevin Wolfe wrote:

Adam,

I don't know that binaries are the way to go. These are not working scripts, but all need to be pasted into the correct spot in a Run Applescript action. I could post a link here that points to this section of my Otto's Garage site. It's much easier to update that with my web software than to try to maintain it here.

Kevin


Kevin;

Don't you think it would be nice then to start a section within Automators perhaps where "scriptlets" for augmenting Automator could reside? On Apple's http://developer.apple.com/macosx/automator.html page, they say:

"Actions are easy to create. There are Xcode templates for creating either
AppleScript or Objective-C based Actions. These templates create the
loadable bundles that Automator uses. The choice of language you use
depends on the type of Action you want to create—as well as your own
personal skill set. There are three general types of Automator Actions
that you can create:

    * Actions that control an application to get something done.
    If the application is scriptable, AppleScript can be used for these
    types of Actions. Objective-C is a good choice if the application
    has a public API, such as Address Book and iChat.
    * Actions that use system frameworks or other system resources
    to get something done. This is typically a job for Objective-C.
    * Actions that perform a "bridge" function, such as prompting the
    user for input, writing output to disk, or converting data from one
    type to another. These types of Actions can be written in either
    AppleScript or Objective-C."


but lots of folks (including me) don't go all the way to creating a proper action using Xcode and AppleScript, I just write the script and stick it "into the correct spot in a Run Applescript action" as you do. We'd still love to have a collection of those here (or at least I would).


iMac running OS X 10.13.1

Offline

 

#7 2005-11-07 03:19:12 pm

Ray Barber
Site Admin
From:: Lake Dallas, Texas
Registered: 2002-11-20
Posts: 348
Website

Re: opening workflows in script editor

Kevin Wolfe wrote:

I don't know that binaries are the way to go ...


Kevin,

That is what Code Exchange is for! roll

Essentially, small snippets that don't really classify as a full blow script, or in this case, an Action/Workflow.


Ray Barber
Admin | MacScripter

Offline

 

#8 2005-11-08 08:17:29 am

avsa
Member
From:: rio de janeiro/paris
Registered: 2005-11-06
Posts: 6
Website

Re: opening workflows in script editor

Seems like you're going the long way around. Revising the script will probably take longer than scripting it in applescript in the first place.


Okay,so i cannot see the worlflow source code. Can I at least see the applescript in some of the actions, to get a feeling of how i should be done? learning by example...

thanks

Offline

 

#9 2005-11-08 08:42:43 am

avsa
Member
From:: rio de janeiro/paris
Registered: 2005-11-06
Posts: 6
Website

Re: opening workflows in script editor

Kevin Wolfe wrote:

If I get your question right, you can't see the code of the actions.


Oh, okay, now I understand your first reply. It's a pity.

Offline

 

#10 2005-11-15 01:50:39 pm

Kevin Wolfe
Member
From:: Cincinnati OH USA
Registered: 2005-10-27
Posts: 67
Website

Re: opening workflows in script editor

Update: The Automator Scriplets forum is up and loaded for bear. Everyone's working scriplets are welcome:

http://bbs.applescript.net/viewforum.php?id=25

Kevin

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)