jimaultwins at yahoo.com
Fri Jul 16 07:32:24 EDT 2010
Your handler has a few errors.
The path containing slashes is not what AppleScript expects
It is a good practice to use 'return varThatWasSet'
in order to send some text back to Rev,
and then be prepared to do some parsing for extra quotes, etc.
I have not worked with AppleScript in a few years so I am quite rusty,
but here is a very useful tip for finding very complete examples right
on your Mac
Go to the upper right of your menu bar, click the AppleScript icon,
Open Scripts Folder/ Open Computer Scripts Folder
An now you should be able to read through more than 100 scripts
written by Apple to interact with numerous programs.
Right-click and open in Script Editor.
Now you should be able to build your won example script syntax library.
Hope this helps,
On Jul 16, 2010, at 12:47 AM, Medard wrote:
> Kay C Lan <lan.kc.macmail at gmail.com> wrote:
>> tell application "Finder"
>> files of folder "Disc:folderA:folder1"
>> end tell
> I am following this interesting thread :-)
> Though, I got an execution error (in Applescript, I presume) by
> this handler:
> on mouseUp
> answer folder "List files in this folder:"
> if it is empty then exit mouseup
> put it & slash into tfolder -- slash mandatory?
> put "tell Application" && quote & Finder & quote into tcommande
> put cr & "files of folder" && quote & tfolder & quote after
> put cr & "end tell" after tcommande
> do tcommande as applescript
> if the result is not empty then answer the result
>>> "Execution Error"!
> end mouseUp
More information about the Use-livecode