AutoHotkey Community

It is currently May 25th, 2012, 8:45 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: October 31st, 2007, 3:11 am 
Leo wrote:
I have the following script:

-----
Rbutton & WheelDown::AltTab
$RButton::MouseClick, right
WheelDown::AltTab
WheelUp::ShiftAltTab
MButton::Send, {ESC}
-----

I'd like it to "cancel" the Alt+Tab when pressing MiddleMouseButton (ie: as pressing ESC when using alt+tab: the alt+tab window will close and it will return to the previously selected window) but it won't work.

I tried several other combinations but none will close the alt+tab window.

Any ideas ?

PS: I know I may press Escape to cancel the alt+tab but I'd like to be able to use alt+tab with mouse only, including cancelling it...


i like this, but it disables my mouse gestures in ff. i don't want the script disabled in ff, as i want to use it in all programs.


Report this post
Top
  
Reply with quote  
PostPosted: November 8th, 2007, 12:59 am 
Offline

Joined: November 7th, 2007, 10:44 pm
Posts: 6
Brandon Pace wrote:
Code:
#NoTrayIcon
*MButton::

GetKeyState, CapsState, CapsLock, T
If CapsState = D
SetCapsLockState, Off

Send, {AltDown}{Tab}
Sleep, 200
Loop
{
GetKeyState, WheelState, MButton, P
If WheelState = D
Sleep, 400
GetKeyState, WheelState, MButton, P
If WheelState = D
Send, {Tab}
Else
{
Send, {AltUp}
Break
}
}

Send, {AltUp}

If CapsState = D
SetCapsLockState, On


Hi,

I was how would you go about modifying the code so that if i have a monitor tool and wed page open and they just switches automatically every 30 second or something like that
at the moment i have

Code:
#z::
Run www.google.com
Run c:\program file\winamp\winamp.exe


regards,
Huy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2008, 7:09 pm 
Chris wrote:
Nice. If you haven't already, you might try the following as well. I find it quite convenient:

MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab

Click the wheel to show or hide the menu, and turn it to navigate through the menu. The wheel will still function normally whenever the Alt-Tab menu isn't visible.


Here's a variation of this one for people who use the normal MButton for other things:
Code:
Ctrl & MButton::AltTabMenu
Ctrl & WheelDown::AltTab
Ctrl & WheelUp::ShiftAltTab

Actually, I don't think you even need the first line, as holding Ctrl and rolling will bring up the Alt-Tab menu anyway. Just release Ctrl to choose the app and close the menu! Escape closes the menu without changing focus.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 16th, 2008, 4:56 am 
Offline

Joined: February 17th, 2008, 3:27 am
Posts: 24
Location: CHINA
Chris wrote:

~Rbutton & LButton::AltTab
RButton::MouseClick, right,,,,, D
RButton up::MouseClick, right,,,,, U ; This method allows right-click-drag to work.


:shock:
this cloudn't work well , always let the RightCilckMenu out :?:

_________________
喜欢看中文的可以来 AutoHotkey 爱好者论坛 : forum.ahkbbs.cn | ahk.5d6d.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2008, 5:36 pm 
When I use this code

Code:
MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab


it works beautifully - very handy, but I do have to press the middle button after choosing to totally dismiss the the Alt-Tab menu. If I don't press the middle button, the next mouse scroll causes the Alt-Tab menu to reappear. Is there a way for the right-click that chooses a window to dismiss the Alt-Tab menu?

Also, if I scroll then dismiss the Alt-Tab menu with a middle click without choosing, the window that was scrolled to has the focus and my taskbar won't autohide until I go that window. Is there a way to not change the focus until the right-click?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2008, 6:29 pm 
I have seen now that some of my question has to do with using the AltTab powertoy from Microsoft. I uninstalled it. So my question is not really applicable until I understand it a little better.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2009, 2:21 pm 
Offline

Joined: February 26th, 2009, 2:10 pm
Posts: 3
Hi, I use a very simple and effective alt tab script like the one mentioned here.

LControl & wheelup::ShiftAltTab
LControl & wheeldown::AltTab

Also I use Opera Browser and to switch tabs I use Right Mouse & Wheel (opera feature), which is even more comfortable.

I want to make a script to use the same combination outside opera to switch applications, and inside opera to switch tabs (current function) with no success.

Code:
RButton & Wheelup::
ifWinActive, ahk_class OpWindow
{
   Send, {RButton}{Wheelup}
}
else
{
   Send, {Shift}{Alt}{Tab}
}
Return

RButton & Wheeldown::
ifWinActive, ahk_class OpWindow
{
   Send, {RButton}{Wheeldown}
}
else
{
   Send, {Shift}{Alt}{Tab}
}
Return


My idea was to detect opera and do nothing (maintain functionality), without opera send alt tab.

The script even block my right mouse button, a total failure.

Any help would be appreciated and will help make the world a better place to live (?).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2009, 4:15 pm 
Offline

Joined: February 26th, 2009, 2:10 pm
Posts: 3
I´m a noob discovering AHK, so here is a simplified version that dont work.

Code:
#ifwinnotactive ahk_class OpWindow
RButton & wheelup::ShiftAltTab
RButton & wheeldown::AltTab


It has to be something with the mouse and wheel because I made a test script thats works

Code:
#ifwinnotactive ahk_class OpWindow
#!p::msgbox outside
RButton & wheelup::ShiftAltTab
RButton & wheeldown::AltTab


Report this post
Top
 Profile  
Reply with quote  
 Post subject: alt-tab working
PostPosted: February 26th, 2009, 9:35 pm 
Offline

Joined: June 11th, 2007, 10:40 am
Posts: 1
mine works perfectly, hit the middle mb to open, then middle scroll wheel to select and left click to open/close.
Code:


#SingleInstance force
#InstallKeybdHook
#InstallMouseHook
#NoEnv

goto, pass
loop
{
GetKeyState, rstate, RButton
GetKeyState, lstate, LButton

if rstate = D
   {
   ;sleep 400

   GetKeyState, lstate, LButton
   if lstate = D
      {
      Send {Alt down}{tab}
      Sleep 400
      Send {tab}
      Sleep 400
      }
   }

IfWinExist ahk_class #32771
   {
   if rstate = U
   if lstate = U
   ;msgbox, left click is dumb
   g=j
   ;MouseClick, Left

   }

}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
pass:




WheelDown::AltTab            ;[Scroll Right]     

Wheelup::ShiftAltTab                    ;[Scroll Left]


~*MButton::Send {Alt down}{tab}        ;[Open menu]        Asterisk is required in this case.

!LButton::Send {Alt up}               ;[Run selected program]           Release the Alt key, which activates the selected window.
~*Escape::
IfWinExist ahk_class #32771         ;[Exit menu without locking up]
    Send {Escape}{Alt up}  ; Cancel the menu without activating the selected window.
return








~Esc::
;ExitApp
return






Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 21st, 2009, 2:30 am 
Offline

Joined: May 16th, 2009, 4:15 pm
Posts: 18
Location: TW
Chris wrote:
~Rbutton & LButton::AltTab
RButton::MouseClick, right,,,,, D
RButton up::MouseClick, right,,,,, U

I am not quite understand the meaning of last two lines of the code

A single line seems to work,
could somebody provide more explaination?

Code:
~Rbutton & LButton::AltTab

_________________
Eucaly61's DIY World (Mainly in Chinese)
http://eucaly61.blogspot.com/search/label/AutoHotKey


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Task Switcher
PostPosted: January 27th, 2010, 11:05 pm 
Thanks for posting this it's exactly what I was looking for. Works great!


Report this post
Top
  
Reply with quote  
 Post subject: Flip 3D Win7
PostPosted: June 29th, 2010, 10:19 pm 
what I want:
Press right mouse button and use wheel up+down to scroll through windows, release right mouse button activates {Enter}

I got hundrets of trys, nothing worked, e.g.

Code:
Rbutton & WheelDown::Send ^#{Tab}
$RButton::MouseClick, right
#IfWinActive, ahk_class Flip3D
Rbutton Up::Send {Enter}


can't think of the other tries atm, hope u can help.
ps: rightclick should work normal if u don't use wheel.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 30th, 2011, 12:52 am 
Offline

Joined: October 13th, 2009, 11:56 am
Posts: 99
could someone please modify the script so it opens alt-tab menu if taskbar is middleclicked? and while menu is shown - mouse wheel up/down should cycle the windows.

OR

maybe it's even possible to just cycle windows in the direct (not most recently viewed) order with just scroll up/down when the cursor is over the taskbar?
That would be even way better.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: Relayer and 4 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group