| View previous topic :: View next topic |
| Author |
Message |
dieselweasel
Joined: 13 Nov 2008 Posts: 10
|
Posted: Thu Nov 13, 2008 3:25 am Post subject: Closing active tab in firefox, else close window.. help! |
|
|
I'm very new to AHK - I've made a few convenient scripts for myself but that's it. What I'm trying to do now is make a hotkey that will close the active tab if I'm in firefox, but outside of firefox it will close the window.
If possible, I want to be able to get the hotkey to be LButton, RButton, and !left. (!left is mapped to one of my mouse buttons) For all of the trial and error I've done so far though, I've just used ^q as my hotkey.
My major problems are figuring out how to map my preferred hotkey combination and get it to work, and how to get AHK to use that hotkey for one thing in firefox and another otherwise. If anyone can help, or even flat-out write a working script, I would be really grateful. I'll post what I have so for if you guys think it would help, but I really don't have anything yet that is even close to working.
Thanks in advance! |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
|
| Back to top |
|
 |
Carlol
Joined: 14 Aug 2006 Posts: 163 Location: CPH
|
Posted: Thu Nov 13, 2008 11:27 am Post subject: |
|
|
To get you started it could look something like this:
| Code: | #IfWinActive, ahk_class MozillaUIWindowClass
NumpadAdd::^+
Return
#IfWinActive |
Meaning that plus on the numpad will send ctrl +, but only in Firefox
Good Luck and you can use AutoItWindow Info Spy to get info on windows
 |
|
| Back to top |
|
 |
|