@mikeyww
Now I have this code and this works now:
Code: Select all
; De functie zet de default printerinstelling Zwart/Wit om in kleur en enkelzijdig printen.
Set_Color_ON()
{
cmd.exe
SetWorkingDir, H:\Settings\Desktop
Run, RUNDLL32.exe PRINTUI.DLL`,PrintUIEntry /e /n\\PRN-MNG01\Xerox_Secure
Sleep, 5000
If WinActive("ahk_class #32770")
Sleep, 1000
Control, ChooseString, 1-Sided Print, ComboBox2
Sleep, 2000
Control, ChooseString, Off, ComboBox3
Sleep, 2000
ControlClick,Button7,ahk_class #32770,&Apply
Sleep, 2000
ControlClick,Button5,ahk_class #32770,OK
Sleep, 2000
;Return
WinClose
}
^F3::Set_Color_ON()
;Set_Color_ON()
;---------------------------------------------------------------------------------------------------
; De functie zet de default printerinstelling kleur om in zwart/wit en dubbelzijdig printen
Set_Color_OFF()
{
cmd.exe
SetWorkingDir, H:\Settings\Desktop
Run, RUNDLL32.exe PRINTUI.DLL`,PrintUIEntry /e /n\\PRN-MNG01\Xerox_Secure
Sleep, 5000
If WinActive("ahk_class #32770")
Sleep, 2000
Control, ChooseString, 2-Sided Print, ComboBox2
Sleep, 2000
Control, ChooseString, On, ComboBox3
Sleep, 2000
ControlClick,Button7,ahk_class #32770,&Apply
Sleep, 2000
ControlClick,Button5,ahk_class #32770,OK
Sleep, 2000
;Return
WinClose
}
^F4::Set_Color_OFF()
;Set_Color_OFF()
And thanks @Xtra