Close non Rev apps via Rev apps?

Sarah Reichelt sarah.reichelt at gmail.com
Sat Jul 8 18:59:20 EDT 2006


> Is it possible to close a program that is not related to my own Rev made
> app?
>
> I want to close and re-open another app after some changes have been
> made to it's settings file.
>
> I don't think it's possible to close the program directly from my Rev
> app, but is it possible via AppleScript?


Here is an AppleScript that will check if Mail is running & quit it if so.

tell application "Finder"
	if exists application process "Mail" then
		tell application "Mail" to quit
	end if
end tell

Just replace "Mail" witht he name of your app and it should work for
anything. The check is necessary because a "tell" will open the app
first before doing the rest, which you don't want if you are only
trying to quit it anyway.

HTH,
Sarah



More information about the use-livecode mailing list