2017-11-04, 19:43
*DISREGARD* correction a couple posts down....... Read post #114 and on. Since the site change, maybe it doesn't copy over well anymore like it did at one point earlier? I can see the code you put up is not correct. The last 3 lines should look like this: For starters, your 60 and 24 are wrong.
It may be because you copy and pasted here instead of using the 'code' insertion tab on the preview post page as I have.
Working here fwiw although I never use it anymore. No reason. Here's the entire thing again for 1080 users:
It should look exactly like this in your file.
Code:
) + ' /x 1920 /y 1080 /r:' + (refreshRate >= 59 ? 60 : 24), 0, true);
}
})();
It may be because you copy and pasted here instead of using the 'code' insertion tab on the preview post page as I have.
Working here fwiw although I never use it anymore. No reason. Here's the entire thing again for 1080 users:
Code:
(function() {
var refreshRate = 0;
// Get current refresh rate
var wmiService = GetObject('WinMgmts://./root/cimv2');
refreshRate = new Enumerator(
wmiService.ExecQuery('SELECT * FROM Win32_VideoController WHERE Availability <> 8')
).item(0).CurrentRefreshRate;
if (typeof refreshRate != 'number' || refreshRate === 0) {
WScript.Echo('Duh. Cannot determine current refresh rate.');
} else {
// Run QRes.exe to change refresh rate
var fs = new ActiveXObject('Scripting.FileSystemObject');
var shell = new ActiveXObject('WScript.Shell');
shell.Run(fs.GetAbsolutePathName(fs.BuildPath(
fs.GetParentFolderName(WScript.ScriptFullName), 'QRes.exe')
) + ' /x 1920 /y 1080 /r:' + (refreshRate >= 59 ? 60 : 24), 0, true);
}
})();
It should look exactly like this in your file.