Please Help: Drag and drop files onto applescript files

Hiyas,

I am writing a script that will automatically place an eps image file into a new quark document.
I want to make the script so that when i drag and drop an eps file onto my applescript file, it will run the script with the eps file dropped and thus open up quark and place this eps image.

This means bascially applescript will run the script using the eps file i drop onto it.

I got no problem with writing the part for quark to open and control the eps file. The problem i am having is the part to allow me to drop an eps file onto the applescript file.

Is it able to configure a script to react to drag and drop?? Currently i cannot do so since if the apple script file won’t highlight when i drag an eps file (or any other file) on top of it.

It would be super super great if someone can suggest a solution to this.
Much Appreicated.

Thanx. :smiley:

You can almost do anything witth applescript.
wrap your code with the following


on open {thooseFiles}
-- put your code here
end

where thooseFiles is a list which will contain the path of every files you’ve been dragging on to it.