• 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: Why this doesn't work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why this doesn't work?


  • Subject: Re: Why this doesn't work?
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 12 Aug 2003 20:33:22 -0700

On Tuesday, August 12, 2003, at 06:39 PM, Marcus Rodrigues wrote:

get (name of application whose the frontmost is true)

frontmost is a property of an application; you can ask a specific application if it is frontmost, but your script was asking nothing in particular which application is frontmost..

Here is code that will work:

tell application "System Events"
set theApps to processes
repeat with thisApp in theApps
if frontmost of thisApp then
set thisisfront to the name of thisApp
exit repeat
end if
end repeat
end tell
display dialog thisisfront

--
Velveeta is to American cheese as American cheese is to cheese
_______________________________________________
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: 
 >Why this doesn't work? (From: Marcus Rodrigues <email@hidden>)

  • Prev by Date: Re: Why this doesn't work?
  • Next by Date: Re: Why this doesn't work?
  • Previous by thread: Re: Why this doesn't work?
  • Next by thread: Re: Why this doesn't work?
  • Index(es):
    • Date
    • Thread