I was trying to write script for Menulets but i was unsuccessful. I am using the UI browser but atil all my efforts are futile. For an app like Quicksilver how can i write scripts which simulates the user clicking on it and select from its drop down.
the parent process for the menulets is SystemUIServer.
For example, this changes a space in Spaces
property favouriteSpace : 3
tell application "System Events"
tell process "SystemUIServer"
tell (1st menu bar item of menu bar 1 whose value of attribute "AXDescription" is "spaces menu extra")
perform action "AXPress"
delay 0.2
perform action "AXPress" of menu item favouriteSpace of menu 1
end tell
end tell
end tell
Thanks a lot stefan for your replies … i must say you are truly amazing.
I agree with you that parent process of menulet is SystemUIServer but these are only OSX specific menulets. Incase you create your own menulet for example application Quicksilver’s menulet —> the parent process of which will not be SystemUIServer.