Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Copyright � Thomas A. Osthege • http://eurocomp.info
- #include <WinAPI.au3>
- Opt('MustDeclareVars', 1)
- _Main()
- Func _Main()
- If $CmdLine[0] <> 3 Then
- MsgBox(0, "Set Color Profile", "Instructions:" & @LF & @LF & _
- """path_to_autoit\AutoIt.exe"" " & _
- """path_to_this_file\ColorProfile.au3"" " & _
- """name_of_monitor"" " & _
- """path_and_name_of_icc_or_icm_file"" " & _
- """path_to_XCalib\XCalib.exe""")
- Exit
- EndIf
- Local $aDevice, $i = 0
- While 1
- $aDevice = _WinAPI_EnumDisplayDevices("", $i) ; get display device data
- If Not $aDevice[0] Then ExitLoop ; done if all devices processed
- If BitAND($aDevice[3], 4) = 0 Then ; we need only real devices
- $aDevice = _WinAPI_EnumDisplayDevices($aDevice[1], 0) ; get the name of the connected monitor
- If StringInStr($aDevice[2], $CmdLine[1]) Then
- ShellExecuteWait($CmdLine[3], "-s " & $i & " -c", "", "", @SW_HIDE)
- ShellExecuteWait($CmdLine[3], "-s " & $i & " """ & $CmdLine[2] & """", "", "", @SW_HIDE)
- ExitLoop
- EndIf
- EndIf
- $i += 1
- WEnd
- EndFunc ;==>_Main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement