This script automates the removal of all images except for the first image of individual or multiple selected listings.
Its purpose is to help reduce the number of images to minimize the overall size of the GarageSale library, while still maintaining a single reference image in case you want to duplicate a listing in the future for a similar item.
tell application "GarageSale"
repeat with theListing in (get selected ebay listings)
-- Check if the listing has more than one image
if (count of listing images of theListing) > 1 then
-- Get the list of images for the current listing
set theImages to listing images of theListing
-- Start removing images from the second one onwards
repeat with i from 2 to (count of theImages)
set imageToRemove to item i of theImages
tell theListing
-- Remove the image
remove listing image image imageToRemove
end tell
end repeat
end if
end repeat
end tell