mikeyww wrote: ↑08 Aug 2022, 19:39
Code: Select all
If !Instr(A_AhkPath, "UIA") && !(DllCall("GetCommandLine", "str") ~= " /restart(?!\S)") {
SplitPath, A_AhkPath, fn ; https://www.autohotkey.com/docs/Program.htm#Installer_uiAccess
ahk = %ProgramFiles%\AutoHotkey\AutoHotkeyU64_UIA.exe
; ahk := StrReplace(A_AhkPath, fn, "AutoHotkeyU64_UIA.exe")
Try Run "%ahk%" /restart "%A_ScriptFullPath%"
ExitApp
}
RButton::Run, magnify
#IfWinExist ahk_exe magnify.exe
LButton::
WinClose
SoundBeep, 1200
Return
#IfWinExist
MButton::
SoundBeep, 1000
ExitApp
Suggestion: for your next thread subject (and preferably this one, too), summarize the problem instead of your interest in getting help to solve it.
Thanks for replying. Why i wanted that is because i'm currently playing a Steam game that requires me to use the map often and, so typical of indie developers, they made the map small as hell and no way to zoom in... which is especially annoying for me as i'm also slightly vision-impaired. I just tried your script there and if i use exactly what you wrote there from top to bottom then nothing actually happens when i double click on the AHK script file (like AHK doesn't even open and i'm just testing on my desktop, not even in-game)
However if i simply copy from "RButton::Run, magnify" down and keep what i had at the top in my original post then it opens the magnifyer but i can't then close AHK by pressing the middle mouse button, leaving me with no choice but to turn the power off and back on. If i then remove "SoundBeep, 1000" from what you put as the final instruction and just have it like i had it in my original post then i can close AHK... however nothing i try can get the left mouse button working so i can't zoom back out once i'm done. Do you know what's not working properly... or possibly even know a different method for zooming in and out in a PC game that doesn't have the borderless window option?