What did not work:
Code: Select all
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^8::
ChangeResolution(1920,1080)
return
^9::
ChangeResolution(1024,768)
return
ChangeResolution(w,h) {
VarSetCapacity(dM,156,0)
NumPut(156,dM,36)
NumPut(0x5c0000,dM,40)
NumPut(w,dM,108)
NumPut(h,dM,112)
DllCall( "ChangeDisplaySettingsA", UInt,&dM, UInt,0 )
}
And this method also didn't work:
Code: Select all
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1920) , (Hei:=1080) , (Hz:=60) )
ChangeDisplaySettings( cD, sW, sH, rR ) {
VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
NumPut(cD,dM,104), NumPut(sW,dM,108), NumPut(sH,dM,112), NumPut(rR,dM,120)
Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}