Applescript changes in GS7

Hi,

I’m in the process of adjusting our applescripts to work with GarageSale 7. I have been able to adjust most of the commands but a few seems to eluding me.

  1. In GS6 I was using:

set immediate payment of myTemplate to true

This does not seem to work in GS7 and can’t find the option. Has it moved and I’m just not seeing it? Is there a command to set this?

  1. Also in GS6 we were using the command:

setSpecific of first selected template with name “MPN” to value “testcode”

This also doesn’t seem to work but I couldn’t see how this might have been adjusted. Is there a new version of the appropriate syntax?

  1. With GS6 to automatically open a template I could get Applescript to go to the file and open it, this does not appear to the case with old templates with GS7. I see that i can import the old templates manually. Is there way to script importing specific templates into the new version?

Thanks for your help.

Rufus

Sorry, that’s not in there yet, but it’s on our TODO list.

Here is how to do this in GarageSale 7:

tell application "GarageSale"
	set theListing to the first item of (get selected ebay listings)
	add item specific theListing specific name "test" values {"test"}
end tell 

Sorry, this particular feature is not yet in GarageSale 7’s AppleScript support.[quote=“rufusbiggs, post:1, topic:1936”]
With GS6 to automatically open a template I could get Applescript to go to the file and open it, this does not appear to the case with old templates with GS7.
[/quote]

What does the script look like you were using for opening exported template files?

Hi Ilja,

Thanks for getting back to me on this. That’s great with the item specifics. It works well.

On the auto-opening a template it was as simple as finding the locating the template and opening it in Finder to bring it back into GS6
I am running the routine from with our database (Filemaker).

This first of all copies the template name from within the database to the clipboard
It then runs the applescript:

set myFile to (the clipboard as string)
set myFile2 to myFile & ".garageSale"
tell application "Finder"
activate
select file myFile2 in folder “Garagesale_templates” of folder “Desktop” of folder “macmini4” of folder “Users” of startup disk
delay 1
open selection
end tell

This seems to work ok with newly made GS7 templates:

tell application "Finder"
activate
open "Macintosh HD:Users:rufusbiggs:Documents:GoogleDrive:Garagesale7_templates:Percussive Adventures 2 (NEW).gslisting"
delay 5
end tell

so this should be ok. Is there anyway to open existing GS6 templates with Applescript or do I have to do it manually?

Related to this, I was asking about exporting multiple, individual templates at once for use later. I think the option to save them individually has gone. Is this also due to come back?

Another issue I have is adding images to a template with applescript. Previously, I was using the keyboard shortcuts to add this like this…

tell application "System Events"
tell process "GarageSale"
set frontmost to true
end tell
delay 3
keystroke “u” using {command down, shift down}
keystroke "http://ebay.absolutemusic.co.uk/additional/mauap192_01.jpg"
delay 1
keystroke return

keystroke "u" using {command down, shift down}
keystroke "http://ebay.absolutemusic.co.uk/additional/mauap192_02.jpg"
delay 1
keystroke return

keystroke "u" using {command down, shift down}
keystroke "http://ebay.absolutemusic.co.uk/additional/mauap192_03.jpg"
delay 1
keystroke return

delay 1
click "OK"

end tell

I think this shortcut has gone but I see the Listing image commands in the applescript dictionary but am unsure how to use them.
I presume it something like

make listing image myTemplate set image URL “http://wwww.thing.com/image.jpg” set is gallery image = “true”

Would you be able to point me towards the correct syntax?

Thanks again for your help.

All the best

Rufus

First, I’d hide GarageSale 6 from AppleScript by either putting in it a zip file and deleting the unzipped original. (Maybe renaming it to “GarageSale 6” is already enough, but I’m not sure about this).

Then I’d try something like this:

tell application "GarageSale"
   open "Users:admin:Desktop:mytemplate.garagesale"
end tell

Have you checked out the “Help” menu > “Show AppleScript Examples” command in GarageSale? There is an example script for adding images:

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 with theListing in (get selected ebay listings)
     tell theListing
	  	set theImage to make listing image file POSIX path of theFile
	  end tell
    end repeat
end tell

To get an URL image added to the selected template, you need to replace the inner loop with:
set the image to make listing image url “http://ebay.absolutemusic.co.uk/additional/mauap192_03.jpg

Hi,

Thanks again for your quick response. Sorry I missed that image example. It works brilliantly!

I’ll experiment with trying to get GS7 to open the old templates.

Thanks again for your help.

All the best

Rufus

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