Convert file with GraphicConverter

Hello, this is my first message in this forum.
I have 2 problems:
-1- upgrading from v 5.6.2 to v 5.9.4. It seems that the Apple bundle Customers registration is no longer available. Do I have to pay for the upgrade?
2 - Using GraphicConverter with Applescript
I need to automatise the “Convert” function with a batch file I made that is in library, applicationsupport, Graphicconverter, actions.
Let me explain:
Since I left my country(France) to retire in South Africa, a friend of mine is scanning everyweek the pages of a local magazine and is emailing them to me. I am trying to make the things easier for her.
First step : The 25 pages are scanned and put in the “Prog” folder on the desktop. This is done manually as it is an old scanner and she uses VueScan.
Second step : She opens GraphicConverter and convert the content of “Progs” to “Progs TR” using the batch file I made for her (convert to gray scale, 150 PPI, JPEG)
Third step: Emailing me the content of “Progs TR” ,7 pages by 7.
Fourth step : (On my side). Saving this pages in “Progs Received” and printing them through Graphic Converter one by one (not with Print Folder because my HP Laserjet 2100TN replies “Out of memory” every time).

I have an written an Applescript for step 3 and 4 but I have difficulties with step 3. (I am rather new at Applescript) This is the script I wrote and it does not work:
The GraphicConverter dictionary indicates for Convert File:
convert file‚v : convert a file using a batch setting to the destination folder
convert file
using batch file specification : batch settings file
to folder file specification : destination folder

property Batch_file : "Traitements_Progs"
on convert(pathSource, pathTarget, path_to__batch)
	tell application "Finder"
			set fileList to every file of folder pathSource as alias list
		on error
			set fileList to (every file of folder pathSource as alias) as list
		end try
	end tell
	tell application "GraphicConverter 5.9.4"
		repeat with currentFile in fileList
			open (currentFile as alias)
			convert file using batch path_to__batch to folder pathTarget
			close window 1
		end repeat
	end tell
end convert

on run
	set folder_desk to (path to desktop folder) as string
	set path_to_user to (path to home folder) as string
	set progsbatch to path_to_user & ":library:Application Support:GraphicConverter:Actions:" & Batch_file
	set progsdest to folder_desk & "Progs tr" as string
	set progssource to folder_desk & "Progs" as string
	convert(progssource, progsdest, progsbatch)
end run

Model: G5
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Let’s start with the obvious - on my machine the application is called “GraphicConverter” without the version number, no matter what version it is. I paid for an “upgrade key” at some point, but I think that was from version 4 to 5. I didn’t pay for the changes within 5 and just upgraded to 5.94 days ago. Simply write to Thorsten Lemke about it - he’s very responsive, and the email address is in the Help menu.

Did you download GraphicConverter OEM for bundle customers?

Thank you for your help.
I had a reply from Thorsten Lemke . Effectively I had not downloaded the OEM version. That is settled now.
I still have the second problem to solve (Convert File).

Thank you Jacques
I tried your script. It did not work at first. I had an error about the batch file not been found or the folder not been found. Finally I made and save another batch file with Graphic converter and it worked.
Before that I downloaded Hagen Henke’s GraphicConverter Manual and found three pages about Applescript with an example of Convert File in a folder action. I tried to adapt the names of the folder and batch file. I installed the Folder action . Nothing happened when I put a file in the folder. If I place an activate, GraphicConverter opens but nothing else happens.
This is the original script

on adding folder items to this_folder after receiving these_items 
tell application "GraphicConverter" 
repeat with i from 1 to number of items in these_items 
set this_item to item i of these_items 
convert file this_item using batch "Merlin:my batch" to folder "Merlin:destination" 
end repeat 
end tell 
end adding folder items to 

Do you have any idea?

I found etrange that the script written as an Applescript example in the book sold on GraphicConverter site is inaccurate.
Thank you again Jacques. This is the final Folder action script and it is working.

property Batch_file : "Traitement"
property Prog_Folder : "Progs tr"
on adding folder items to this_folder after receiving these_items
	set progdest to ((path to desktop folder) as string) & Prog_Folder
	set progsbatch to ((path to application support folder from user domain) as string) & "GraphicConverter:Actions:" & Batch_file
	tell application "GraphicConverter"
		repeat with this_item in these_items
			convert file (this_item as file specification) using batch (progsbatch as file specification) to folder progdest
		end repeat
	end tell
end adding folder items to


Model: PowerMac G5 2GHZ - MacBook 2GHZ White
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

This is very odd, when Trying to compile these scripts (No changes made to the script at this stage) I get

“Expected end of line, etc. but found class name.”

and the file part is highlighted in convert file (this_item as file specification) using batch (progsbatch as file specification) to folder progdest
Any ideas??

Open the Graphic Converter dictionnary with Applescript editor. If you don’t find “Convert”, you don’t have the right version .I found the “convert” command in the dictionnary when I used Graphic Converter 5.9.4.

Before I found this thread I had dropped the dict from 5.9.4 on to the library and had look.
Convert was there but I got the same odd behaviour.

It turns out that Script Editor was pulling up the 5.7 OEM version That I did not want to trash.

I have now zipped it and re-launched SE.
working now.

Thanks :slight_smile:


I am trying to get this folder action script to work, but it doesn’t. If I add activate to the script it does open GC but then nothing happens.

Any ideas on getting this working would be appreciated.