This from Thomas England - dated 25-9-02 06.17 pm: > Frankly, I'm surprised that such a sensible request is so difficult to > achieve. Very grateful for any help.
Hi, Thomas. Did you try out the solution offered by Paul Berkowitz for identifying the frontmost app at the top of the script and restoring it to the foreground if displaced? Not that this helps to track down why your script is activating the Finder. It seems unlikely that the culprit is Play Sound. I'm using verion 1.0.5, exactly as it came when I downloaded it. I've been using this app since it first came out, and have never had problems with the Finder coming to the front. Where appropriate, I wrap the Play Sound 'tell' block in an 'ignoring application responses' block so that the rest of the script carries on regardless while the sound is playing, and as Play Sound has pretty low overheads, and many of my scripts use it to provide audio feedback, I just leave it running. What is the nature of the sound you are playing? And where is it actually stored? I couldn't for the life of me work out where it was from the line: set soundAlias to (my ParentFromPath(path to me, true) & soundFilename) as alias For my own purposes, I use a folder full of mail chimes that are selected randomly: set theChimeFolder to [a location on my hard disk] set theChimes to list folder alias theChimeFolder without invisibles set theChime to (theChimeFolder & (some item of theChimes)) as alias tell application "Play Sound" to play sound theChime As for running scripts from rules in OE/Entourage, I don't - but I do run a few from schedules, which probably amounts to much the same thing. For reasons lost in the mists of OS 9, I use a separate stay-open script applet that receives instructions from the simple scripts triggered by the schedules. My 'Mail Checker' applet does all the work - the scheduled script just tells it to run. (And another tells it to quit when Entourage is unplugged.) Back to your original problem: if you just want to get your frontmost application back, Paul has already supplied a solution that should work for you; if you want to completely avoid having the Finder steal the spotlight and interrupting your workflow, then you need to identify the point in the execution of the script (or the rule that runs it) at which this happens. You haven't provided this information as yet. Cordially Nick -- To unsubscribe: <mailto:[EMAIL PROTECTED]> archives: <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/> old-archive: <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
