AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mouse Click in upper left corner to close/open Firefox tabs

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Zeos
Guest





PostPosted: Wed May 27, 2009 7:38 am    Post subject: Mouse Click in upper left corner to close/open Firefox tabs Reply with quote

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

PostPosted: Wed May 27, 2009 12:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
cheeseds
Guest





PostPosted: Wed May 27, 2009 2:17 pm    Post subject: Reply with quote

works like a dream man i think i may use it to
Back to top
Zeos
Guest





PostPosted: Wed May 27, 2009 5:48 pm    Post subject: Reply with quote

Gold stars my friend.. That works perfectly.
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group