• 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
frontmost application... :(
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

frontmost application... :(


  • Subject: frontmost application... :(
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Tue, 23 Apr 2019 01:08:47 +0900

tell application "System Events"
        tell (process 1 where frontmost is true)
                set myName to its name
                display dialog myName
        end tell
end tell

Obviously, I get the name of the script, when I want the name of the
application that's frontmost before I launch the script... :(

Ultimately, I just want to get the path of the frontmost document of the
frontmost application...

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: frontmost application... :(
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: System Events problem with Mojave (10.14)
  • Next by Date: Re: frontmost application... :(
  • Previous by thread: Re: Move-copy-alias selected file to chosen destination
  • Next by thread: Re: frontmost application... :(
  • Index(es):
    • Date
    • Thread