Close windows from within Expose

Joined
Feb 24, 2010
Messages
2
Reaction score
0
Points
1
Location
Kalisz/Poznan, Poland
Your Mac's Specs
MBP 13,3
Hi

Some time ago I was looking for a way to close windows/apps while in Expose and didn't find an answer.

Today I wrote a simple Applescript and assigned it to Four Finger Click in BetterTouchTool:
Code:
tell application "System Events"
	key code 36
	delay 0.5
	keystroke "w" using command down
end tell

It selects the highlighted window and closes it (Cmd+W) (your key codes may vary).
If you want Expose to launch again add these two lines inside tell:
Code:
	delay 0.1
	key code 101
Maybe it's not the most elegant way, but it does the job for me.

If you know of some better way, please share your knowledge!

--
phosphide
 
Joined
Jul 12, 2010
Messages
1
Reaction score
0
Points
1
Sorry if this is a dumb question, but how do you assign the script in BetterTouchTool?... I am having trouble.

Thanks much :D
 
OP
P
Joined
Feb 24, 2010
Messages
2
Reaction score
0
Points
1
Location
Kalisz/Poznan, Poland
Your Mac's Specs
MBP 13,3
The predefined actions list contains "Open Application / File / Script" option.
I simply saved the script as an application and pointed it in BTT.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top