Lookup if an application by application file id is running and if it is running quit it
Lookup if an application by application file id is running and if it is running quit it
- Subject: Lookup if an application by application file id is running and if it is running quit it
- From: Bjorn Van Blanckenberg <email@hidden>
- Date: Thu, 19 Sep 2002 13:48:39 +0200
I want to lookup if Quark by application file id is running and if it is
running quit it.
The script below always quits the Finder
property Quarkprogramfolder : ""
property QuarkApp : ""
tell application "Finder"
set pathName to container of (application file id "XPR3") as string
set savedDelim to text item delimiters of AppleScript
set text item delimiters of AppleScript to {":"}
set thePath to (reverse of rest of reverse of every text item ,
of pathName) as string
set text item delimiters of AppleScript to savedDelim
set Quarkprogramfolder to thePath
set the QuarkList to list folder Quarkprogramfolder without invisibles
repeat with i from 1 to the count of the QuarkList
if item i of the QuarkList contains "PassPort" then
set the QuarkApp to item i of the QuarkList
end if
end repeat
if exists process QuarkApp then
tell application QuarkApp
activate
quit
end tell
end tell
--
Oooo.
oooO ( )
( ) ) /
\ ( (_/
\_)
Thanks
Bjorn Van Blanckenberg
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.