Applescript and Adding images

So I am using an Applescript to create a listing from an excel spreadsheet. On that spreadsheet are the local paths to the images themselves. I use pretty much the same exact line of code from the sample Applescript:
set theImage to make listing image file POSIX path of aImage
But I get a cryptic error stating that “AppleEvent handler Failed” even when the code calling the image to be added to an auction draft is not in an actual handler.

Has anyone else experienced this? Is their a reliable work around (short of just having the user add all the images to all of the auctions themselves)?


What version of macOS and GarageSale are you using? Also, what format is the image in? JPG?

Maybe it has to do with the security restrictions Apple imposed on newer macOS version? :thinking:

GarageSale 7 and Mac OS 10.13.6. I doubt that it has anything to do with security because the error is so obscure. The images are formatted as Jpg’s. And, just for fun, about 25% of the time the script actually works on 1 or 2 images. But then, after a couple more times of testing, it goes back to generating that same error again.

Chris, I am terribly sorry for useless message, I can’t help you, but I am infinitely interested in this matter. Is it really possible to create listings within GS from an excel file? Why none told me before :dizzy_face: ?
Well, I NEED IT. Would you be so kind to share any tip about the way (if you prefer by PM) you did such a trick, please? This would be finally the way to synch GS and abebooks :pray:


How do you send a PM on here, is that even possible? You can email me

1 Like

Could it be that GarageSale has problems with certain images on your system, or the access permissions for the image files prevent GarageSale from reading those images?

I changed to stock AppleScript to create 10 listings, each with 10 images, and I worked as expected:

tell application "GarageSale"
	set theFile to choose file with prompt "Please select an image file" invisibles no multiple selections allowed no showing package contents no
	repeat 10 times	
		set theListing to make ebay listing
		repeat 10 times
			tell theListing
				set theImage to make listing image file POSIX path of theFile
			end tell
		end repeat
	end repeat
end tell

I am trying to add an image from a path on the computer. So in the excel file it would just list “/Users/chrisn/documents/image1.jpg, /Users/chrisn/documents/image2.jpg, /Users/chrisn/documents/image3.jpg” and then you should be able to give those paths to GarageSale. And that is where it is failing, when passing the paths of the images to GarageSale. Also the error happens on both my machine and the person I am writing the script for, so it is happening on several different machines.

Maybe it has to do with the images itself. Have you tried adding an image that failed to GarageSale manually to verify that GarageSale can import that image?

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