Ilounah Posted February 21 Share Posted February 21 (edited) Good Day, I'm trying to Cover button 0 and X with a GUI if items are already sent (Black fonts gray background) to the counter so no one can void there product, and unlock (Gui Delete) if the item was not yet sent (Green font items) unsent orders can be deleted. The problem is why my code is deleting Gui Delete even the condition is exist. Sorry for my Bad english, I attached video how it works. #include <MsgBoxConstants.au3> #include <GuiConstants.au3> Opt("PixelCoordMode", 2) While 1 Local $color = "0x6EC89B" ; the color you are looking for (green) Local $result = PixelSearch(0, 137, 1, 465, 0xE8E9F1, 0) If Not @error And IsArray($result) Then $hGui = GUICreate("Disabled", 180, 60, 350, 907, $DS_MODALFRAME) GUISetState() WinSetOnTop($hGui, "", 1) WinActivate($hGui) Do Sleep(1000) ; wait 1 second before checking again Until Not $result Else GUIDelete() EndIf WEnd Edited March 2 by Ilounah My Boss ask me to remove :( attached video Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now