Tripple Monitor Brightness switch

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Prostrelov
Posts: 14
Joined: 22 Mar 2018, 00:41

Tripple Monitor Brightness switch

22 Mar 2018, 00:51

Hi guys.
I use simple toggle script that switch brightness on both my monitors to 30 and 60 values.
I want to add additional value to this toggle with brightness 100.
How should i do it ?

Code: Select all

; BRIGHTNESS BOTH MONITORS
#b::
if (toggle := !toggle ) {
	run, C:\Program Files (x86)\Dual Monitor Tools\DMT.exe "DMT:General:ChangeBrightness 1:60"
	run, C:\Program Files (x86)\Dual Monitor Tools\DMT.exe "DMT:General:ChangeBrightness 2:60"
}else{
	run, C:\Program Files (x86)\Dual Monitor Tools\DMT.exe "DMT:General:ChangeBrightness 1:30"
	run, C:\Program Files (x86)\Dual Monitor Tools\DMT.exe "DMT:General:ChangeBrightness 2:30"
}
return
Rohwedder
Posts: 7647
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Tripple Monitor Brightness switch

22 Mar 2018, 02:48

Hallo,
try (untested):

Code: Select all

; BRIGHTNESS BOTH MONITORS
#b::
If Bright = 30
	Bright = 60
Else If Bright = 60
	Bright = 100
Else
	Bright = 30
Loop, 2
	run, C:\Program Files (x86)\Dual Monitor Tools\DMT.exe "DMT:General:ChangeBrightness %A_Index%:%Bright%"
Return
or

Code: Select all

; BRIGHTNESS BOTH MONITORS
#b::
Bright := StrSplit("30,60,100",",")[q:=q<3?(0 q)+1:1]
Loop, 2
	run, C:\Program Files (x86)\Dual Monitor Tools\DMT.exe "DMT:General:ChangeBrightness %A_Index%:%Bright%"
Return
Prostrelov
Posts: 14
Joined: 22 Mar 2018, 00:41

Re: Tripple Monitor Brightness switch

22 Mar 2018, 09:56

Oh nice first one works great.
Many thx.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mebelantikjaya, NinjoOnline and 259 guests