Czy mógłby mi ktoś pomóc przekształcić ten scrypt tak aby gdy pojawi się czarny kolor komputer się wyłączył. ( Ten kod podał mi robem w innym temacie )
HotKeySet("{F11}", "_getDefault")
HotKeySet("{ESC}", "wyjdz")
$x = 0
$y = 0
$color = 0
$newColor = 0
$status = "off"
While 1
If $status = "on" Then
If _getCurrentColor($x, $y) <> $color Then
TrayTip("Aktualny kolor się zmienił !", $x & " x " & $y, 5, 1)
;MsgBox(0, "Kolor sie zmienił ! : Koordynatu punktu :", $x & " " & $y, 1)
Sleep(1000)
ElseIf _getCurrentColor($x, $y) == $color Then
TrayTip($color & " - kolor na pozycji : ", $x & " x " & $y, 5, 1)
Sleep(1000)
EndIf
EndIf
WEnd
Func _getDefault()
$coord = MouseGetPos()
$x = $coord[0]
$y = $coord[1]
$color = Hex(PixelGetColor($coord[0], $coord[1]), 6)
$status = "on"
EndFunc ;==>_getDefault
Func _getCurrentColor($xDef, $yDef)
$newColor = Hex(PixelGetColor($xDef, $yDef), 6)
Return ($newColor)
EndFunc ;==>_getCurrentColor
Func wyjdz()
Exit
EndFunc ;==>wyjdz
Daje + za każdą nawet minimalną pomoc