Re: AppleScript program to execute files
Re: AppleScript program to execute files
- Subject: Re: AppleScript program to execute files
- From: Scott Earleywine <email@hidden>
- Date: Wed, 15 Aug 2001 23:14:14 -0500
I tried this, but I get an error dialog "Execution Error......The variable
DONE is not defined.". Any clue(s)?
Thanks,
SLE
--
Scott Earleywine
email@hidden
http://homepage.mac.com/earleywine/
>
From: Timothy Bates <email@hidden>
>
Date: Thu, 16 Aug 2001 14:01:10 +1000
>
To: Scott Earleywine <email@hidden>, AppleScriptUsers List
>
<email@hidden>
>
Subject: Re: AppleScript program to execute files
>
>
property basePath : "Disk:folder:folder:"
>
>
repeat while not DONE
>
set theKey to item 1 of (keys pressed) --need jon's scripting addition
>
set playFile to "none"
>
if theKey is "1" then
>
my playFile("test1")
>
else if theKey is "2" then
>
my playFile("test2")
>
else
>
set DONE to true
>
end if
>
end repeat
>
>
to playFile(theName)
>
tell application "Finder"
>
open file (basePath & theName)
>
end tell
>
end playFile