undefined variable
undefined variable
- Subject: undefined variable
- From: <email@hidden>
- Date: Mon, 30 Jul 2001 17:25:44 -0400
hello all,
i am trying to write an apple script to check to see if a certain program
is running. if it is running, then the script quits the apllication and
deletes it. if the application is on the hard drive and isn't running. it
deletes it. and, if the program isn't on the hard drive, or running, then
it just quits. i have everything working, but trying to get applescript
to check to see if the application is active or running. i run into an
undefined variable.
tell application "Finder"
activate
if exists folder "appfolder" of startup disk then
if "app" is active then # THIS IS WHERE I GET THE ERROR#
tell application "Finder"
activate
end tell
quit application "app"
else
tell application "app"
activate
quit application "app"
end tell
end if
end if
tell application "Finder"
activate
if exists folder "appfolder" of startup disk then
select folder "appfolder" of startup disk
delete selection
empty trash
else
quit application "Script Editor"
end if
end tell
end tell