Re: AppleScript program to execute files
Re: AppleScript program to execute files
- Subject: Re: AppleScript program to execute files
- From: Timothy Bates <email@hidden>
- Date: Thu, 16 Aug 2001 14:01:10 +1000
On 16/8/01 12:34 PM, "Scott Earleywine" <email@hidden> wrote:
>
Hey all.
>
>
I have a question...I am interested in creating an AppleScript application
>
that will allow me to execute (i.e. Using CMD+O to 'open') a file.
tell finder
open file "your file"
end
>
If I want "sound1" to play...I want to 'hit' Q,
>
if I want "sound2" to play...I want to 'hit' W, if I want "sound3" to
>
play...I want to 'hit' E.
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