Scripting Help: Modify Originating Postal Code

I’m looking for a way to update the zip code GarageSale submits to Ebay for calculated shipping. The zip code / postal code is buried pretty deep in the listing’s shipping options and I don’t want to do all those clicks by hand.

I have been able adapt other scripts to make bulk changes to shipping services offered on my listings, but I can’t seem to make this one happen, though.

Thanks!

Can you post the AppleScript code you are trying with?

Thanks for responding, Ilja!

I have tried a bunch of approaches, and the code below is only my most recent failure:

tell application "GarageSale"
	
	repeat with theListing in (get selected ebay listings)
		
		set theOption to (the shipping option of theListing)
		
		tell theOption
			set the originating postal code of theListing to "94702"
			
		end tell
	end repeat
end tell

I have tried it with and without quotes around my zip code.

I went in with theOption and shipping option business because that’s what worked in a script for adding and removing domestic shipping services. This was after failing with a version based on a script for changing the design identifier that just used tell theListing.

If I run the above script from Script Editor with one listing selected in GarageSale, this is the error I get:

GarageSale got an error: Can’t set originating postal code of ebay listing id “2F7B662F-388C-47DE-8504-9ABEDF9ED7D7” to “94702”.

Seems you are running into two issues add once:

  1. You need to change the set line in your code to this:
    set the originating postal code to 94702

  2. In the shipping version of GS, the ‘originating postal code’ attribute is mistakenly marked as read-only. This version should fix this:

http://downloads.iwascoding.com/downloads/GarageSale_7_2017-10-11.dmg

P.S. It might be tricky to get AppleScript to talk to the fixed version of GarageSale. It’s best you remove other GarageSale versions from your Mac before trying.

1 Like

Hi Ilya,

It’s still not working for me. I trashed and deleted the old version of GarageSale and restarted my Mac. I have removed the quotes from around my zip code in the script.

I can confirm that

  • the script dictionary for GarageSale (GarageSale.sdef) now shows “originating postal code (text)” where it was “text, r/o” before.
  • other scripts are working on listings in the new version of GarageSale.

Script Editor says:

error “GarageSale got an error: Can’t set originating postal code of ebay listing id "2C69AD7E-3536-4E24-8B90-A1AA42948816" to 94702.” number -10006 from originating postal code of ebay listing id “2C69AD7E-3536-4E24-8B90-A1AA42948816”

The -10006 error supposedly means: “The write operation was denied”, which does sound to me like it could still think that originating postal code is read only.

You are haven’t changed your AppleScript as I outlined under 1. in my original post, didn’t you?

1 Like

Touché, Ilja!

I saw that you removed the quotes around my post code, but missed the other change. Of course it works like a charm now!

Many thanks!

1 Like

Here’s the functioning script, for anyone who needs it (just change the postal code to your own — and be sure to get a version of GS with the corrected Applescript dictionary):

tell application "GarageSale"
	repeat with theListing in (get selected ebay listings)
		set theOption to (the shipping option of theListing)
		tell theOption
			set the originating postal code to 94702
		end tell
	end repeat
end tell

Thanks again!

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