Friday, October 16, 2009

TIP:Applescript to invoke All Windows function of Exposé and bind it to key you please

Here is the applescript to invoke the All Windows function of Exposé :
on run
-- delay is needed so that keybindings defined in
-- tools like Fastscripts works
delay 0.1
tell application "System Events"
-- 101 is key code for F9 key
key code 101
end tell
end run
Assuming you have bound Exposé:All Windows function to F9 key.

So you say - what is the big deal?

Well, if you look at System Preferences... > Exposé and Spaces pane > Exposé Tab , you will see that it allows you to bind various functions to limited set of keys. The script enables you to bind it to any key such as Option+Tab. How? Heres how:

Save the above script in ~/Library/Scripts/Expose.app . Then bind it to Option+Tab using Quicksilver or Launchbar or Fastscripts.

No comments: