| View previous topic :: View next topic |
| Author |
Message |
Zeos Guest
|
Posted: Wed May 27, 2009 7:38 am Post subject: Mouse Click in upper left corner to close/open Firefox tabs |
|
|
Im a sort of noob and I cant find any good examples that show a mouse clicking in a location to perform an action.
I would like to be able to (when in firefox) move my mouse to the upper left corner of the screen (0,0) and left click and have it output (ctrl-W) to close current tab. and then if I right click it opens a new tab (ctrl-T).
Will go well with the MileWideBack addon for firefox. http://dragtotab.mozdev.org/milewideback/ |
|
| Back to top |
|
 |
ManaUser
Joined: 24 May 2007 Posts: 1121
|
Posted: Wed May 27, 2009 12:36 pm Post subject: |
|
|
There's no single command to do that, but this should accomplish what you want:
| Code: | CoordMode Mouse, Screen
#IfWinActive ahk_class MozillaUIWindowClass
LButton::
MouseGetPos X, Y
If ( X = 0 AND Y = 0)
Send {ESC}^w
Else
Send {LButton Down}
Return
LButton Up::
If GetKeyState("LButton")
Send {LButton Up}
Return
RButton::
MouseGetPos X, Y
If ( X = 0 AND Y = 0)
Send {ESC}^t
Else
Send {RButton Down}
Return
RButton Up::
If GetKeyState("RButton")
Send {RButton Up}
Return |
|
|
| Back to top |
|
 |
cheeseds Guest
|
Posted: Wed May 27, 2009 2:17 pm Post subject: |
|
|
| works like a dream man i think i may use it to |
|
| Back to top |
|
 |
Zeos Guest
|
Posted: Wed May 27, 2009 5:48 pm Post subject: |
|
|
| Gold stars my friend.. That works perfectly. |
|
| Back to top |
|
 |
|