AppleScript

From GarageSaleWiki

Jump to: navigation, search

Using AppleScript you can modify various properties of a single auction template or a group of auction template. AppleScript is a scripting language invented by Apple to automate certain task. It's more complex than using Automator actions, but has offers a greater degree of freedom.

You can use the Script Editor appliction to create and run AppleScripts. The Script Editor application is in the Apple Script folder in your Mac's Applications directory.

Template attributes

You can get a list of the template attributes editable trough apple script by choosing Open Dictionary… from the File menu in the Script Editor application. Select GargeSale Suite and template to see what attributes can be edited.

Modifying the selected auction templates

Use a repeat loop to change a certain attribute for all the selected templates (or all the templates in the selected template groups). Here is an example script that changes the starting price for all selected templates to 2.00.

tell application "GarageSale"
    repeat with myTemplate in the selected templates
       set the starting bid of myTemplate to "2.00"
    end repeat
end tell

You can replace starting bid in the above example with any template attribute shown in GarageSale's AppleScript dictionary.

Modifying all auction templates

If you would like to change an attribute for all your templates in GarageSale, not just the selected ones, you have to repeat through templates instead of selected templates.

tell application "GarageSale"
    repeat with myTemplate in the templates
       set the starting bid of myTemplate to "2.00"
    end repeat
end tell
Personal tools