In Mac 10.6, I want to cause an active application to become de-active, or minimized by Python
I know I could use sendKey in Windows with Python, then what about in
In addition to Yinan, which will send the keystroke to the currently active application, you can send it to a specific application as follows. Pass the following to osascript as before, or save it to a file and pass the file to osascript
tell application "Safari"
activate
tell application "System Events" to keystroke "r" using {command down}
end tell
This will send Cmd + r to Safari after bringing it to the foreground