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
Code: Select all
loop{
Sleep 3000
IfWinNotExist, Counter-Strike
{
Send {F24}
break
}
else
{
continue
}
}
Run ResolutionChanger.ahk
return