Re: System Events (was Re: Frontmost)
Re: System Events (was Re: Frontmost)
- Subject: Re: System Events (was Re: Frontmost)
- From: Hudson Barton <email@hidden>
- Date: Thu, 5 May 2005 12:58:29 -0400
Title: Re: System Events (was Re:
Frontmost)
OK. Thanks for the explanation, but I still don't quite
understand it because if that script is called by another script, then
it works just fine from Script Menu.
While you're at it, I understand there are issues with calling a
script in Tiger. Can you tell me whether you think this will
work in both environments?
try
run
script (alias y) --- Panther
on error
tell
application "System Events" to do script (alias y)
--Tiger
end try
H.
At 9:26 AM -0700 5/5/05, Daniel Jalkut wrote:
Ah, yes. This is because the Script
menu's method of executing scripts always switches the front-most app
out before executing. So your test for "fronstmost" returns
System Events instead of the app you're in.
This is a perfect example of FastScripts'
superior application integration. Your script works like a charm
from FastScripts.
Daniel
On May 5, 2005, at 9:10 AM, Hudson Barton
wrote:
tell
application "System Events"
set devant to (name of every process whose frontmost is true and
visible is true and name is not "System Events") as
string
end
tell
tell
application "Finder" to activate application
"iCal"
tell
application "System Events"
set frontmost of process devant to true
end
tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden