Skip to content

Instantly share code, notes, and snippets.

@udoprog
Last active August 18, 2019 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udoprog/72ec6058ae95c53e16751b442f47731d to your computer and use it in GitHub Desktop.
Save udoprog/72ec6058ae95c53e16751b442f47731d to your computer and use it in GitHub Desktop.
AHK script to toggle between two different FPS limits in RTSS
; Inputs two different FPS values into RivaTunerStatisticsServer when toggled.
#SingleInstance force
values := [144, 116]
stage := 1
focus_row := 1
FOCUS_TOP := 163
FOCUS_LEFT := 18
FOCUS_ROW_HEIGHT := 16
PgUp::
{
; focus the correct item in RTSS
focus_x := FOCUS_TOP + FOCUS_ROW_HEIGHT * focus_row
focus_y := FOCUS_LEFT
ControlClick,x%focus_x% y%focus_x%,RivaTunerStatisticsServer
; change framerate limit
value := values[stage]
stage := Mod(stage, values.MaxIndex()) + 1
ControlClick,x480 y230,RivaTunerStatisticsServer
ControlSend,ahk_parent,%value%{enter},RivaTunerStatisticsServer
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment