I’d like to create an AppleScript for Graphic Converter that is an applet; when I drop a file on it, Graphic Converter creates a new file in the same folder as the applet that doubles the size of the image’s canvas using white for the added canvas.
My questions are:
Where should I post questions about AppleScript?
Are there any example scripts to get me started?
Thank you. (Apologies for not posting on the right board.)
on open theOriginalImageFile
--
-- Configuration settings
set blnSaveCopy to true #Save as copy; do not change original file.
set strFileFormat to "PNG" #Convert and save image to .png file.
tell application "GraphicConverter 11"
open theOriginalImageFile
set theWindow to window 1
tell theWindow
set listImageDimensions to image dimension as list
set intWidth to first item of listImageDimensions as integer
set intHeight to last item of listImageDimensions as integer
change margins with {intWidth / 2, intHeight / 2, intWidth / 2, intHeight / 2}
end tell
set theResult to save theWindow as strFileFormat makeCopy blnSaveCopy
close theWindow
end tell
end open
I want to enhance my droplet script to trap files that a user (accidentally) drops on it which Graphic Converter can NOT open.
I found an extensive list of file formats that Graphic Converter can import but I don’t know how to test a file to see whether it corresponds to one of these formats. I’m thinking that I need to check the file’s extension against a list of supported extensions.
Do you have a list of all the file extensions for all the file formats that Graphic Converter can open?
Alternatively, is there another way of trapping files that Graphic Converter can NOT open?