AutoHotKey script for toggling effects

  • jmp909
  • Topic Author
More
9 years 1 month ago - 9 years 1 month ago #1 by jmp909 AutoHotKey script for toggling effects was created 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
pastebin.com/qfkpQsXn

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

INSTRUCTIONS
* Install AutoHotKey from http://www.autohotkey.com/
* download my script from [b]http://pastebin.com/qfkpQsXn[/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

NOTES
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)
#Numpad1::FXSwitch("USE_DEPTHBUFFER_OUTPUT")
#Numpad2::FXSwitch("USE_TONEMAP")

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!

regards
J
Last edit: 9 years 1 month ago by jmp909.
The following user(s) said Thank You: BrandonHortman

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

  • crosire
More
9 years 4 weeks ago #2 by crosire Replied by crosire on topic AutoHotKey script for toggling effects
Nice, this is handy! =)
The following user(s) said Thank You: jmp909

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.