Here's another another issue: some arcane function of AutoHotKey makes it so that sending Alt also presses Ctrl for an instant... If you want to use Ctrl for a toggle like I do, you need to suppress that with something like "#MenuMaskKey vkE8". Since I don't use the F1-F4 keys to select characters, and since I definitely want to switch windows with Alt+Tab, here's what my .ahk file looks like in the end:
SetTitleMatchMode, 2 #IfWinActive, DOS #MenuMaskKey vkE8
There is another issue for those of us who use the Function keys to select characters (F1, F2, F3, F4), since Alt+F4 attempts to close the game. Thus, I edited the script to fix this, adding a new 3rd function, same as the Tab and Escape functions but for the F4 key. In case it's useful to someone:
To translate the above: (much easier than it looks)
- add .old to the end of the original .exe. - edit the .ahk file with notepad++ or other text editor. I suggest you also delete the line "!Tab:: Gosub, AltToggleOffDIV2" that refers to what you are removing. - save! - download the AutoHotKey installer from https://autohotkey.com/. - run the convert .ahk to exe program. - browse to and select your edited script in source window; type in whatever name you want in the destination window. - hit convert - now just run it before the game starts and you can alt-tab as needed - profit!
I just placed a shortcut into my taskbar next to the game shortcut to account for my aging brain ;-)
@ IcemanSR: thanks for a great script - saves my thumb an enormous amount of wear and tear! (also, cool utility your comment pointed me to).
It seems to turn itself off whenever I move the screen enough or something, and since I can never be sure if it's on or not, I find myself pressing alt every now and then to check for items, defeating the purpose of this tool :/
14 comments
SetTitleMatchMode, 2
#IfWinActive, DOS
#MenuMaskKey vkE8
$Alt:: Gosub, AltToggleOnDIV
!Esc:: Gosub, AltToggleOffDIV
AltToggleOnDIV:
toggle := !toggle
Send % "{Alt " . ((Toggle) ? ("down") : ("up")) . "}"
return
AltToggleOffDIV:
toggle = ; Off
Send {Alt up}{Escape}
return
SetTitleMatchMode, 2
#IfWinActive, DOS
$Alt:: Gosub, AltToggleOnDIV
!Esc:: Gosub, AltToggleOffDIV
!Tab:: Gosub, AltToggleOffDIV2
!F4:: Gosub, AltToggleOffDIV3
AltToggleOnDIV:
toggle := !toggle
Send % "{Alt " . ((Toggle) ? ("down") : ("up")) . "}"
return
AltToggleOffDIV:
toggle = ; Off
Send {Alt up}{Escape}
return
AltToggleOffDIV2:
toggle = ; Off
Send {Alt up}{Tab}
return
AltToggleOffDIV3:
toggle = ; Off
Send {Alt up}{F4}
return
AltToggleOffDIV2:
toggle = ; Off
Send {Alt up}{Tab}
return
For better effect use "Win" taster to alt tab game...
- add .old to the end of the original .exe.
- edit the .ahk file with notepad++ or other text editor. I suggest you also delete the line "!Tab:: Gosub, AltToggleOffDIV2" that refers to what you are removing.
- save!
- download the AutoHotKey installer from https://autohotkey.com/.
- run the convert .ahk to exe program.
- browse to and select your edited script in source window; type in whatever name you want in the destination window.
- hit convert
- now just run it before the game starts and you can alt-tab as needed
- profit!
I just placed a shortcut into my taskbar next to the game shortcut to account for my aging brain ;-)
@ IcemanSR: thanks for a great script - saves my thumb an enormous amount of wear and tear! (also, cool utility your comment pointed me to).
- E
IcemanSR, it didn't work just by removing those lines. I had to do what eduardo4 said. alt+tab works now =).
Thank you.
You are probably pressing Escape button , by doing that it will turn off the tool.
Tab will also turn off the tool
So you can alt tab properly