Changing Condition through Applescript

I have been using Applescript modify existing listings and create new ones with most of the specifics set to what I need them to be. One issue I have been running into is that I can’t figure out how to change the condition from Applescript.

I have been using something like this:
tell application “GarageSale”

set thelisting to the first item of ( get selected ebay listings)

set the condition of the listing to “Pre-Owned”

end tell

I have also tried to use typical names and id’s from the Ebay API reference.

I was having some issues changing some of the other settings such as the listing design and layout. The workaround I used was to set the defaults for new listings to what I use and create the listings from scratch with the rest of the information. I’m not sure if I just don’t have the syntax right or what. There isn’t a default condition though so the only other way I can think of changing it is going in afterwards and changing them to what I need but I would prefer to have the change happen through Applescript automatically.

Is there a way to change these settings from Applescript?


The Script Editor app says:

condition (text) : The condition of the item. Use a value from “supported conditions”.

supported conditions (list of text, r/o) : Supported condition values for the selected categories of the listing.

So you maybe first have to fetch the “supported conditions”. However, I am not an AS pro.

What also should check is whether the listing already has a category selected. Without a category you can’t select a condition, I guess.

Regards, Kristian

I messed around a bit with fetching the “supported conditions”

I tried setting them to a variable and then setting the condition to the condition chosen from a list. That seemed to work

I also tried to set the condition to “Pre-Owned” after getting the supported conditions and that worked too.


tell application “GarageSale”

set thelisting to the first item of ( get selected ebay listings)

set conditionlist to the supported conditions of thelisting

set chosencondition to ( choose from list conditionlist)

set the condition of thelisting to chosencondition

set the condition of thelisting to “Pre-owned”

end tell

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.