Using Python, find active window name in Mac OS X

Total Post:24

Points:168
 1198  View(s)
Ratings:
Rate this:

How can I find the name of the application that window I currently using with the time (MAC OS X using Python)?

  1. Post:214

    Points:1642
    Re: Using Python, find active window name in Mac OS X

    From AppKit import NSWorkspace

    active_app_name = NSWorkspace.sharedWorkspace().frontmostApplication().localizedName()

    print active_app_name

      Modified On Sep-30-2015 11:06:49 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!