Help writing script for Photoshop CS

Hi all,

I’m a newbie to the world of scripting so please accept my apologies if the answer to this question is rather simple.!!

I am trying to write a script that will allow me to…

Open Adobe Photoshop CS
Create a Contact Sheet from a specific folder
Print all Contact Sheets
Save all to a different specific folder
Close

I want this script to be fully automated so that i can press run and walk away.

So far i have written the following script…

tell application “Adobe Photoshop CS”
activate
end tell
tell application “Adobe Photoshop CS”
do action “Contact Sheet” from “Jacqui Sets”

this opens photoshop and starts the contact sheet action which works fine using preset actions in Photoshop.

The problem i now have is trying to print, save and close. I can get the 1st image to, but not all open images.

I’m not fully up to speed on scripting yet so any help anyone can give me would be greatly appreciated.

Thanx
Jax

Jax,

Where are you at with this issue? Did you solve your questions?

Hi Scott,

I’ve managed to write a series of scripts which i’ve attached to seperate folders.
The 1st script attached to a start folder, sends files to be actioned in photoshop (contact sheet, save to a specified folder, close).
The 2nd script attached to a start folder, once the 1st script has been executed sends files to an Original Files folder.
The 3rd script attached to the specified folder sends the files to be printed.
The 4th script attached to the specified folder sends files once printed to an End folder.

I’m now working on a script that will keep the files in the end folder sequential. i.e if file ContactSheet001.jpg already exists in the end folder it will rename the file in a sequential order eg. If ContactSheet009.jpg is the last file it will rename ContactSheet010.jpg and so on…

If you want a look at any of the scripts let me know
Also if you have any ideas on how to run the last script it would be greatly appreciated.

Thanks
Jax

Hi buddy.

How do you send some code to the printer
I tried several times but with no results

Can you show me the code

Thanks in advance
Mr Loft

Model: PowerMac G5
AppleScript: AppleScript 1.9.3
Browser: Safari 312.3.3
Operating System: Mac OS X (10.4)

Apologies for the year late reply i have not been on this forum for some time…
I presume this matter has been solved by now but just in case here is the script…

 on adding folder items to this_folder after receiving these_items
	try
		tell application "Finder"
			repeat with i from 1 to number of items in these_items
				try
					set this_item to item i of these_items
					set the path_string to this_item as string
					set the final_path to POSIX path of the path_string
					do shell script "/usr/bin/lp '" & final_path & "'"
				on error error_message
					tell application "Finder"
						display dialog "Error for item " & (this_item as string) ¬
							& ": " & error_message buttons {"Continue", "Cancel"} ¬
							default button 1 giving up after 120
					end tell
				end try
			end repeat
		end tell
	on error error_message
		tell application "Finder"
			display dialog error_message buttons {"Cancel"} ¬
				default button 1 giving up after 120
		end tell
	end try
end adding folder items to 

Browser: Firefox 2.0.0.13
Operating System: Mac OS X (10.4)