You are not logged in.
For those working on Automator actions, I wanted to talk about the simple elegence of the bindings system for actions. (for those unfamiliar with Automator I offer the following two links: Automator Actions, and Apple's Automator page) The main pieces of background knowledge one should have to make an action with Applescript are Applescript, using XCode/InterfaceBuilder basics, bindings, property lists, (and to use, put in some Library/Automator folder on a machine running 10.4 or later ^_^ ) This is on bindings, which allows you to get the values set by the user in the Automator application to use in your script; for other information, look around our site.
My (extremely simple) example Automator action is one that takes it's input, displays a dialog with "display dialog" of the input and returns the input (basically letting you peek at what's going down the "pipe"). It allows editing of the button text for "confirm", "cancel", and "other" buttons, as well as a check box for whether or not to include the "other" button.
(Background Step: create a new "applescript pipeline stage" from the template of a similar name in XCode, name it and place it wherever you like.)
open the main.nib file (in resources) and place text views and labels as below on the view provided (note the bottom label is actually a checkbox & it's built in label
Applescript:
on run {input, parameters}
set buttonList to ({|confirmButton|, |cancelButton|} of parameters)
set defaultButton to |confirmButton| of parameters
if |showOtherButton| of parameters then
set buttonList to buttonList & (|otherButton| of parameters)
end if
display dialog input buttons buttonList default button defaultButton
return input
end run
Note that the keys are enclosed in pipes ("|") but other wise reflect exactly what you put into the parameters object in IB. I am pretty sure any unicode string will work (for IB) as the Parameter object just wraps an NSMutableDictionary with an NSObjectController (but haven't tried yet, so don't cry to me if it doesn't ^_^) This means you should be able to put spaces and other special chars in your key's name if you like.
Finally we should get the info.plist to tell the action it's defaults; here's the relevant part as seen in "Property List editor"
Offline