Applescripts changing auto decline price to percentage of BIN

I am trying to modify one of the example scripts to change the auto decline price to a percentage of the buy it now price. I thought I had it until it came with an error:

error “GarageSale got an error: Can’t get buy it now price.” number -1728 from buy it now price

Here is the script:

set theReply to (display dialog “Change the ‘auto decline best offer price’ price of all selected listings by percentage (0-100) of ‘buy it now price’:” default answer “90” buttons {“Cancel”, “OK”} default button “OK”)
if button returned of theReply is “OK” then
tell application “GarageSale”

	set percentage to text returned of theReply
	repeat with theListing in (get selected ebay listings)
		set oldPrice to the auto decline best offer price of theListing
		set the auto decline best offer price of theListing to (buy it now price * percentage / 100) as real
	end repeat
end tell

end if

What am I missing?

The copy and paste kind of jumbled things. Here is a screenshot of the Script Editor

Try adding “of theListing” to the “buy it now price”:
… (buy it now price of theListing * percentage / 100) …


That seemed to do the trick. Thanks!!

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