In Moc10.6, I want to put a active application to de-active, or minimize by Python
I know I could use sendKey in Windows with Python, then what about in Mac?
Thanks, guys!
In Moc10.6, I want to put a active application to de-active, or minimize by Python
I know I could use sendKey in Windows with Python, then what about in Mac?
Thanks, guys!
Here is what I found from a different question in stackoverflow. It works pretty good to my problem.
import os
cmd = """
osascript -e 'tell application "System Events" to keystroke "m" using {command down}'
"""
# minimize active window
os.system(cmd)
Maybe you could run an OSA script (man osascript) from Python, for instance, and drive the application?