Nerevar Posted December 13, 2024 Report Posted December 13, 2024 So after a while of not finding a solution to my problem, which is that my remote (FLIRC) wakes my HTPC with EVERY button press instead of just the sleep/wake button, I decided to solve it using a simple bat script and autohotkey in Windows (can likely be done without autohotkey too). This issue in general is obviously problematic if you use your remote outside of using the (HT)PC. 1. So first save your flirc configuration file via the flirc gui that you use normally and put in in some folder, importantly before saving change the power on/off button on your remote in Flirc to map onto an arbitrary (not used) key. 2. Then, make a new configuration and here you only want the on/off remote key to be mapped onto the wake/sleep button, no other mappings. Also save and put into the same folder as previous config. 3. Then, make a bat file (open notepad, put in commands below, and save as "All files" and name as "anyname.bat"). cd "C:\Program Files (x86)\Flirc" flirc_util.exe loadconfig "C:\[filepath of config]\[configname].fcfg" For the first line put the path of the flirc files, should be same as in my code for windows users. For second line put the filepath and name of your usual use config that you just saved. 4. Make another bat file, this time for the other config created. 5. (Optional): You can created a further 2 bat files that open the above two bat files silently (will only flash on screen) by adding the command: START /MIN CMD.EXE /C "C:\[filepath to bat file]\[name of bat file].bat" Voila! You now have 2 bat files, one that needs to be ran before the PC goes to sleep (only has wake/sleep button mapped) and another that needs to be ran when the PC wakes up (restores your usual mappings). No more accidental power on of PC with other remote buttons. The bat file that you need to run when the PC wakes up can be easily ran automatically via windows task scheduler. For the bat that needs running before PC goes to sleep you need to make the arbitrary button that is now mapped for the on/off key during PC use ran the bat file itself and then make the PC go to sleep. I'm sure many approaches would work, as stated above I use autohotkey and its dead easy to map the arbitrary key via: [arbitrary key]:: { Run "C:\Users\[username]\Documents\flirc_configs\load_load_sleeping_config.bat" Sleep 5000 DllCall("PowrProf\SetSuspendState", "Int", 0, "Int", 0, "Int", 0) } First, I run the bat that silently runs the bat that loads the config, then wait a bit (you never know if for some reason loading takes some time), and then put PC to sleep. Hope this helps someone having the same issue, I did not find direct solutions on this forum. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.