Re: Script not quitting Entourage
Re: Script not quitting Entourage
- Subject: Re: Script not quitting Entourage
- From: Paul Skinner <email@hidden>
- Date: Fri, 22 Dec 2000 11:53:27 -0500
Chris,
The processes command returns a list of references. You'll have to parse
it.
>
tell application "Finder"
>
set currProcs to processes
>
end tell
--> {process "Control Strip Extension" of application "Finder", process "FBC
Indexing Scheduler" of application "Finder", process "Folder Actions" of
application "Finder", process "OSA Menu" of application "Finder", process
"Time Synchronizer" of application "Finder", process "Outlook Express" of
application "Finder", process "Internet Explorer" of application "Finder",
process "Scripter." of application "Finder"}
Here's what I would do...
set processList to {}
tell application "Finder"
set theProcesses to processes
end tell
repeat with thisProcess in theProcesses
set the end of processList to thisProcess as text
end repeat
return processList
--> {"Control Strip Extension", "FBC Indexing Scheduler", "Folder Actions",
"OSA Menu", "Time Synchronizer", "Outlook Express", "Internet Explorer",
"Scripter.", "Adobe. Photoshop. 5.5"}
--
Paul Skinner
Ron Chapple Studios
>
From: chris stearns <email@hidden>
>
Date: Fri, 22 Dec 2000 02:59:33 -0800
>
To: AppleScript Users <email@hidden>
>
Subject: Script not quitting Entourage
>
>
Hi Scripters.
>
>
I'm working on a script to back up my Microsoft User Data (MUD) Folder. I
>
want the script to:
>
-quit Entourage, if it is running,
>
and then:
>
-run the rest of the script (moving folders, etc).
>
>
The second tell block works just perfectly. (I just used the 'record'
>
feature on the Script Editor, as I'm sure you can see. Sure, it's ugly code,
>
but it's a newbie's dream. And it works.)
>
>
Trouble is, the script will NOT quit Entourage if it is running. I picked up
>
the 'currProcs' bit of the script on this list a week or so ago.
>
>
Any ideas? Here's the script:
>
>
>
---
>
tell application "Finder"
>
set currProcs to processes
>
end tell
>
if "Microsoft Entourage" is in currProcs then
>
tell application "Microsoft Entourage" to quit
>
end if
SNIP!