Page 1 of 1

Help with AltTabMenu

Posted: 18 Jul 2021, 10:05
by felipecastillo
Hi!

I want to get different functions when I press Ctrl + Alt + 1 , depending on which window is active at the time.

My problem is that I also want that, if none of the windows is active, the program shows me the Alt-Tab Menu (for changing windows), but is not working (nothing happens).

Here is my code:

Code: Select all

!^1::
IfWinActive Visualizador 
	SendInput, {Numpad1}
else ifWinActive MedDream
	SendInput, {Numpad6}
else ifWinActive CHILERAD
	SendInput, {Numpad6}
else ifWinActive RadiAnt
	SendInput, {Numpad6}
else
	AltTabMenu
return
[Mod edit: [code][/code] tags added.]


Thanks in advance!
Felipe

Re: Help with AltTabMenu

Posted: 18 Jul 2021, 15:34
by mikeyww
Check the documentation on this one-- a bit different from other commands.
Each Alt-Tab hotkey must be either a single key or a combination of two keys, which is typically achieved via the ampersand symbol (&). AltTab and ShiftAltTab are two of the special commands that are only recognized when used on the same line as a hotkey.
Examples there may also help.

Re: Help with AltTabMenu

Posted: 25 Jul 2021, 10:41
by felipecastillo
read the documentation and realized that is not possible :(

"Currently, all special Alt-tab actions must be assigned directly to a hotkey as in the examples above (i.e. they cannot be used as though they were commands). They are not affected by #IfWin or #If."

Thank you mikey!