Running a stay open applet in OS X... :-(
Running a stay open applet in OS X... :-(
- Subject: Running a stay open applet in OS X... :-(
- From: Mr Tea <email@hidden>
- Date: Sun, 21 Apr 2002 17:52:21 +0100
I'm trying to adapt an AppleScript setup I used with Outlook Express in OS 9
to work with Entourage in OS X.
Three scripts are involved: a stay-open applet that tells me stuff about new
mail, a script that sends a 'run' command to the applet as part of the 'send
& receive all' schedule, and a script that quits it when Entourage quits.
In the OS 9 setup, the mail-announcing applet remained in the background,
but in OS X, the applet leaps unbidden to the front if it wasn't already
open when it gets the run command (ie, when Entourage runs the 'send &
receive' schedule during launch).
This is the relevant part of the script that sends the 'run' command:
ignoring application responses
tell application "Mail Checker X" to run
end ignoring
The 'ignoring' block is required to prevent OE/Entourage from locking up
while it waits for the applet to finish running.
This is the script from 'Mail Checker X':
on run
set theWords to ""
delay 30
tell application "Finder" to set activeApp to creator type of (every
application process whose frontmost is true)
if activeApp is not "OPIM" then my AnnounceMail(theWords)
end run
How can I fix this so that the applet stays in the background when it starts
up for the first time?
Thanks
Mr Tea
--
_______________________________________________
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.