simple applescript?

Dave Cragg dcragg at lacscentre.co.uk
Fri Dec 10 07:16:34 EST 2004


On 10 Dec 2004, at 10:03, Chipp Walters wrote:

> Hi all. Need a bit of help here...why doesn't this work?
>
> on mouseUp
>   answer file ""
>   if it is empty then exit to top
>   put it into pPDFpath
>   replace "/" with ":" in pPDFpath
>   if char 1 of pPDFpath is ":" then delete char 1 of pPDFpath
>   put "tell application " &quote& "Finder" & quote & cr into tScript
>   put "set the file type of " &quote& pPDFpath &quote& \
>         " to " &quote& "PDF " &quote& cr after tScript
>   put "end tell" after tScript
>   do tScript as Applescript
>   put the result into sError
> end mouseUp
>
Just guessing, but don't you need a file reference in there somewhere. 
Perhaps this:


put "set the file type of " &quote& "file" && pPDFpath &quote& \
         " to " &quote& "PDF " &quote& cr after tScript

Or is that one of those cases when you need "alias" instead of file.

Dave



More information about the use-livecode mailing list