AutoHotKey script for toggling effects

  • Posts: 136
5 years 3 months ago - 5 years 3 months ago #1 by jmp909
(thanks to Mobeeuz for the heads up on this and the base code)

I have written a small script for AutoHotKey that will let you define keys to swap out the 1s and 0s in MasterEffect.h without having to leave the game

It's not well tested but seems to work ok.

It relies on ReShade's auto-recompile when it detects a change to the settings file (in this case MasterEffect.h). You need to give it a couple of seconds before switching again, otherwise you're going to end up toggling your values in your file but ReShade won't pick them up, then if you try toggle again you'll be back to your original value obviously

* Install AutoHotKey from
* download my script from [b][/b]
* place the file in your game folder as an .ahk file eg ToggleFX.ahk
* doubleclick the .ahk file and it should now run in the background

currently I've only included 2 modifiers, but if you look at the bottom of the script you can see where to add more. (note # means Windows Key as Modifier so eg Windows+Numpad 1)

WARNING: it deletes your MasterEffect.h file before rewriting it so make a backup before trying this out

all it's essentially doing is looking for your string (eg USE_TONEMAP) followed by any number of spaces and then a 0 or 1, up to an end of line which is \r\n here. you may need to adapt the script if your text editor doesn't use \r\n. It then changes that 0 to a 1 and viceversa and rewrites the whole file

There would be better ways to do it with readline probably and my RegEx could be improved, but it'll do for now. Feel free to make a better version!

The following user(s) said Thank You: BrandonHortman

Please Log in or Create an account to join the conversation.

  • Posts: 3741
5 years 3 months ago #2 by crosire
Nice, this is handy! =)
The following user(s) said Thank You: jmp909

Please Log in or Create an account to join the conversation.