• 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: Understanding System Events...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding System Events...


  • Subject: Re: Understanding System Events...
  • From: John Delacour <email@hidden>
  • Date: Fri, 11 Apr 2003 02:04:10 +0100
  • Mac-eudora-version: 6.0a14

At 2:01 am +0200 11/4/03, Jakob Peterhdnsel wrote:

Ok, I'm trying to get the name of the frontmost application.

This code does not work-Why?:
----------------------
tell application "System Events"
get name of (application process where frontmost is true)
end tell
----------------------
Using only 'process' and not 'application process' does not matter...


processes (every process) is a list. 'whose' and 'where' can only be used with lists.

tell application "System Events"
first item of (get name of processes whose frontmost is true)
end tell
-- "Smile"


This can be abbreviated to:


tell application "System Events"
name of first process whose frontmost is true
end tell
--> "Smile"

-- JD
_______________________________________________
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.

References: 
 >Understanding System Events... (From: Jakob Peterhänsel <email@hidden>)

  • Prev by Date: Re: getting the user's download folder
  • Next by Date: Re: getting the user's download folder/Smile
  • Previous by thread: Re: Understanding System Events...
  • Next by thread: HTTP POST multipart/form-data?
  • Index(es):
    • Date
    • Thread