Cheers, Roger
Message: 9 Date: Thu, 20 Mar 2003 09:41:23 +1000 Subject: Re: Launch Command From: Sarah <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED]
Hi Roger,
I have actually been following this thread, but before it had seemed to me that your copy of TextEdit was in a folder called "GetIt". When your AppleScript confirmed that is was really in your normal Applications folder, it seemed that you had just been looking in the wrong place :-)
Now you have got me intrigued, so I wrote some scripts to help you work
out what is going on. If you want me to send my demo stack, let me know:
Create a new stack and make 2 fields and 2 buttons: In field 1, put the following Applescript: tell application "Finder" choose file with prompt "Find TextEdit" end tell
Leave field 2 empty.
Set button 1's script to: on mouseUp do fld 1 as AppleScript put the result into appPath replace ":" with "/" in appPath replace quote with "" in appPath delete word 1 of appPath -- alias delete last char of appPath -- : put "/" before appPath put appPath into fld 2
launch appPath put the result end mouseUp
Set button 2's script to: on mouseUp launch fld 2 end mouseUp
(Usually I would give me field's descriptive names, but as this is only a test, I didn't bother.)
Now click button 1 - you should get a standard file selector dialog box. Choose TextEdit and click "OK". TextEdit should launch and the correct Revolution path to it should go into field 2. If you quit TextEdit and then click button 2, TextEdit should launch automatically without any file selection.
Using AppleScript's file selector works better for OS X app since it seems to understand better that they need to be treated as files event though they are really applications.
Let's hope it works this time :-) Sarah
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
