Saturday, July 4, 2020

#1 2002-04-29 08:15:26 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Tell Finder to drop file on application

I'm sure it is simple but I can't seem to tell the finder to drop a file on an application. The following script returns the error: "Finder got an error: can't continue drop."

Applescript:

tell application "Finder" to set this_file to "HD:Image.jpg" as alias
tell application "Finder" to drop onto application "Preview" with this_file

thank you


One mans trash is another mans treasure


Filed under: Finder

Offline

 

#2 2002-04-30 04:29:51 am

Rob
Member
From:: Ohio, USA
Registered: 2002-11-20
Posts: 1886

Re: Tell Finder to drop file on application

As far as I know, there is no "drop onto" in the Finder's dictionary. Maybe this will work.

Applescript:

set this_file to "HD:Image.jpg" as alias -- The Finder doesn't need to be involved with this step.
tell application "Finder" to open this_file using application file "HD:Desktop Folder:Preview"

--
I've never used this before so I'm guessing at the syntax.
Rob


Filed under: Finder

Offline

 

#3 2002-04-30 06:51:50 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Tell Finder to drop file on application

Thank you Rob,
I had to add ".app" to "Preview". After that it works fine!
regards, Chip Neveux


One mans trash is another mans treasure

Offline

 

#4 2002-04-30 06:57:16 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

Re: Tell Finder to drop file on application

Thank you Rob,
I had to add ".app" to "Preview". After that it works fine!
regards, Chip Neveux


One mans trash is another mans treasure

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)