Automate procces on compressor droplet error

Yesterday I spend almost all day on this issue, I’ve googled and browsed almost every forum but in the end I couldn’t find any topic about this error.
There are a lot of great scripts available witch check if the files download/copy process has finished.

My problem is I can’t get this part of the script to work at all:

set droplet to "Source_30_720p.app"
set theItems to choose file with prompt "select source"
tell application "Finder" to open file theItems using (application file "droplet" of "Macintosh HD:Library:compressorSetups:")

The locations and names should be all correct.
When I launch the script (within the script editor or as a .app), it prompts for the source file. So I select an .mov file.

Then the script comes up with this error:
AppleScript Error
Can’t make “droplet” into type integer.

I really can’t get a clew, does any one can help me on this one?
I’ll appreciate it ,

Hi,

the using parameter of the open command expects a reference like file specifier, alias or just a path string

tell application "Finder" to open theItems using "Macintosh HD:Library:compressorSetups:" & droplet

or

tell application "Finder" to open theItems using (path to application "Source_30_720p")

Note: theItems is an alias, the keyword file in front of an alias is not needed (and causes an error message in some cases)

Hi, nerox. Welcome to the BBS. :slight_smile:

The correct syntax for that last line is:

tell application "Finder" to open theItems using (application file droplet of folder "Macintosh HD:Library:compressorSetups:")

If you put quotes round a variable name, it turns it into a literal string: ie. “droplet”. You need to use the variable rather the string. You should also put the Finder keyword folder in front of the folder path to turn it from a string to a folder specifier.

Nigel and Stefan,

It works!
Thank you so much, my colleagues did look at me kind of strange on the moment when I almost screamed: “finally it works, YES!” (When I got the script run without errors). :wink:

I’m very very happy, thanks a lot.