Applescript Dynamic

Hey… Just been reading up on Applescript and have been having a hard time finding an answer to one of my questions. I predominantly want to use Applescript to conform image files to a particular standard through Photoshop, but from all the examples of Applescript I have found a static path needs to be declared to affect that file.

Question: Can you make an Applescript that will run on a file the user chooses (by something like a file dialogue box or drag and drop)

If so could somebody give me a hint with the code
Thanks

I don’t use Photoshop so I’m not familiar with it but this code, when saved as an application, should be close to what you need for a droplet. Note: If files AND folders will be dropped on the droplet, you’ll need additional code to handle the files in the folders.

on open files_
	repeat with file_ in files_
		tell application "Photoshop"
			set open_file to (open file_)
			-- do stuff to open_file
		end tell
	end repeat
end open

– Rob

You can bring up a “file dialogue box” using…

set file_ to (choose file without invisibles)

…which will return something like…

j

Thats great guys, thanks for that.
I will give it a go