CSGO resolution changer problem

Ask gaming related questions (AHK v1.1 and older)
TPMx
Posts: 1
Joined: 08 Jan 2019, 00:21

CSGO resolution changer problem

08 Jan 2019, 00:47

Hello:

I've been attempting to create a script that changes my monitor resolution by pressing a hotkey (using hotkey resolution changer to facilitate that). It's intended to change my monitor's resolution whenever I launch counter strike, and revert it back to my native resolution when I've closed counter strike. The idea behind this is that I like to play with a non-standard resolution, but am otherwise limited to fullscreen mode only if I don't also change my monitor's resolution. I've managed to get an early version working, but I've been trying to optimize it without much success.

This changes the resolution:

Code: Select all

loop{
Sleep 6000
IfWinActive, Counter-Strike
{
Send {F23}
break
}
else
{
continue
}
}
Run NormalResolutionChanger.ahk
return
This reverts the change after the game is closed:

Code: Select all

loop{
Sleep 3000
IfWinNotExist, Counter-Strike
{
Send {F24}
break
}
else
{
continue
}
}
Run ResolutionChanger.ahk
return
My attempted optimization has mainly been on the loop that checks for CSGO being closed. I've been having issues with being tabbed out during each check, when I am not directly giving input in the game. While I've tried creating a bandaid fix by just extending the duration between each loop, I've hit a limit where it instead becomes an annoying wait for my resolution to change back. I'm mainly wondering if there would be an easier way to check for counter strike being opening or closed, rather then just have a constant loop checking in the background.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 73 guests