The script turns a mouse button in to "enter" in 2 applications (3dsmax and Photoshop) using #ifWinActive. The issue seems to be that if I click on something else, namely something like a folder window or Chrome (most likely active on my second monitor) and then I click back to 3dsmax (on my main monitor) I lose connection to the active window / active window does not return to "3dsmax.exe". It might be remaining on that previously selected application.
Currently the only fix I've found for this is to alt+tab twice. Basically alt+tab to the folder or chrome or whatever I had clicked on previously and then alt+tab back to 3dsmax. This re-engages the active window to 3dsmax.exe
I have very limited knowledge here and am looking for a fix for this so that things run like Windows 7 where if i'm actively using 3dsmax or Photoshop the autohotkey always works.
Thanks.
Code: Select all
;========================================================================================
;--------------------------------------------------------------------3dsMax-----------------------------------------------------------------------
;========================================================================================
#ifWinActive ahk_exe 3dsmax.exe
{
Xbutton1::
Send {Enter}
Sleep, 100
return
}
;========================================================================================
;--------------------------------------------------------------------PHOTOSHOP-----------------------------------------------------------------------
;========================================================================================
#ifWinActive ahk_exe Photoshop.exe
{
Xbutton1::
Send {Enter}
Sleep, 100
return
}