Re: Entourage: Kill that Daemon!
Re: Entourage: Kill that Daemon!
- Subject: Re: Entourage: Kill that Daemon!
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 15 Nov 2002 10:16:01 -0800
On 11/15/02 9:33 AM, "Gnarlodious" <email@hidden> wrote:
>
> What do you mean "running an application from a script"????
>
Because Application scripts don't show in Entourage's menu, I tried what you
>
suggested, compiled script says:
>
tell application "Quit Daemon" to quit
>
Because:
>
tell application "Quit Daemon" to launch
>
left it open and "quit" runs it then quits it! Seems a little strange to a
>
neophyte!
Referring to an application in a tell block makes it open (in the front,
worse than 'launch') if it's not open, correct. But why in God's name would
you be telling some application called "Quit Daemon" to quit? Wouldn't you
want it to run instead? You also have to look out for the fact that your
system might pick the wrong applet since they all have the same creator code
"ToyS". You would need to include a script property that saved the alias of
the correct applet after asking you to find it the first time.
>
>
Hope that makes sense . . . (soon you will learn not to respond to this
>
sig!)
No, Rachel. you're still not making much sense:
1. Why would you be wanting to quit the daemon from within Entourage? As
I've said now about four times, you can't rebuild the database while
Entourage is open, and closing the daemon while Entourage is open is
pointless since it will just open again anyway. Quit the daemon after you
quit Entourage and all other Office apps. Which means you CAN'T DO IT FROM
THE ENTOURAGE MENU since Entourage won't be open.
2. Since it's not going to be in the Entourage menu, you can do it either
from an applet, or from a complied script in the Jaguar Script Menu. Either
way, the script is
try -- in case it's not open
tell application "Microsoft Database Daemon" to quit
end try
I've also said that about four times. Nothing could be easier. it seems to
me that script in the Script menu is easiest, but if want a lumbering applet
to open and do it, that's OK too. Don't make the applet a stay-open.
It still bewilders me why you would be trying to call such an applet from
the Entourage script menu, since it won't work. However, if you ever want to
call some other applet from the Entourage Script menu, do it this way:
property someApplet : missing value
if someApplet \= missing value -- is an alias, check if it exists
try
get someApplet
on error
set someApplet to missing value
end try
end if
if someApplet = missing value
set someApplet to choose file with prompt "Where is your \"someApplet\"
script application?" with icon 1 -- save as alias
end if
set appletPath to someApplet as string --(wherever it may be currently)
tell application appletPath
launch -- opens in background
run -- just runs once this way
end tell
-----------------------
For reasons you can read about in the ASLG, telling it to run instead of
launch and run makes it run twice. If you're happy to have it open in the
front, then you can tell the Finder to open it instead.
Especially if the applet includes commands to Entourage itself, you'll want
to
ignoring application responses
tell application appletPath
launch -- opens in background
run -- just runs once this way
end tell
end ignoring
That way the trigger script doesn't hang around waiting for the applet to
finish, plus you can go about doing you usual activities in Entourage. use
with care.
--
Paul Berkowitz
_______________________________________________
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.