• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: System Events (was Re: Frontmost)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events (was Re: Frontmost)


  • Subject: Re: System Events (was Re: Frontmost)
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 5 May 2005 11:26:33 -0400

Dumb question time - what is this "script menu" of which you speak?

On 5/5/05, Hudson Barton <email@hidden > wrote:
Indeed, "System Events" seems to be inaccessible when run from the
Script Menu (but not when run in any other context).  Take this
simple script for example:

tell application "System Events"
        display dialog "hello"
end tell

At 9:56 AM -0400 5/5/05, Hudson Barton wrote:
>Further to my earlier message.... if the script containing this code
>is called by another script, then it works, and if it is run from
>the "Script Editor" it works.  But if it is run directly from the
>Script Menu, it does not.
>
>H.
>
>
>At 7:44 AM -0400 5/5/05, Hudson Barton wrote:
>>I'm trying to run a script from the script menu and then return the
>>user to application he was in before the script ran.  The following
>>works just fine when run from the Script Editor, but not when run
>>from the Script Menu.  Why?
>>
>>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
>>
>>----Do stuff here including opening 1 or more other applications
>>
>>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>
 _______________________________________________
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

  • Follow-Ups:
    • Re: System Events (was Re: Frontmost)
      • From: kai <email@hidden>
References: 
 >XMLRPC Apple Event --- Sending base64 data (From: Rajeev Kumar <email@hidden>)

  • Prev by Date: AppleScript working with Tiger
  • Next by Date: Re: Nice Automator article on O'Reilly
  • Previous by thread: Re: System Events (was Re: Frontmost)
  • Next by thread: Re: System Events (was Re: Frontmost)
  • Index(es):
    • Date
    • Thread