d0n Posted June 24, 2009 Share Posted June 24, 2009 Hi i have something here that works but is there a way to get a more accurate, like by 1% not 10%? expandcollapse popupFunc HP() $0 = Hex(PixelGetColor(55,75,$handle),6) $10 = Hex(PixelGetColor(65,75,$handle),6) $20 = Hex(PixelGetColor(76,75,$handle),6) $30 = Hex(PixelGetColor(87,75,$handle),6) $40 = Hex(PixelGetColor(98,75,$handle),6) $50 = Hex(PixelGetColor(109,75,$handle),6) $60 = Hex(PixelGetColor(120,75,$handle),6) $70 = Hex(PixelGetColor(130,75,$handle),6) $80 = Hex(PixelGetColor(140,75,$handle),6) $90 = Hex(PixelGetColor(150,75,$handle),6) $100 = Hex(PixelGetColor(161,75,$handle),6) If $100 = "FF0000" Then GUICtrlSetData($Progress, "100%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $90 = "FF0000" Then GUICtrlSetData($Progress, "90%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $80 = "FF0000" Then GUICtrlSetData($Progress, "80%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $70 = "FF0000" Then GUICtrlSetData($Progress, "70%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $60 = "FF0000" Then GUICtrlSetData($Progress, "60%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $50 = "FF0000" Then GUICtrlSetData($Progress, "50%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $40 = "FF0000" Then GUICtrlSetData($Progress, "40%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $30 = "FF0000" Then GUICtrlSetData($Progress, "30%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $20 = "FF0000" Then GUICtrlSetData($Progress, "20%") GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) Elseif $10 = "FF0000" Then GUICtrlSetData($Progress, "10%") GUICtrlSetState($Checkbox1, $GUI_CHECKED) Elseif $0 = "FF0000" Then GUICtrlSetData($Progress, "1%") GUICtrlSetState($Checkbox1, $GUI_CHECKED) EndIf EndFunc Link to comment Share on other sites More sharing options...
GodlessSinner Posted June 24, 2009 Share Posted June 24, 2009 (edited) $handle = WinActivate("");modify it HP($handle) Func HP($handle) $0 = Hex(PixelGetColor(55,75,$handle),6) $10 = Hex(PixelGetColor(65,75,$handle),6) $20 = Hex(PixelGetColor(76,75,$handle),6) $30 = Hex(PixelGetColor(87,75,$handle),6) $40 = Hex(PixelGetColor(98,75,$handle),6) $50 = Hex(PixelGetColor(109,75,$handle),6) $60 = Hex(PixelGetColor(120,75,$handle),6) $70 = Hex(PixelGetColor(130,75,$handle),6) $80 = Hex(PixelGetColor(140,75,$handle),6) $90 = Hex(PixelGetColor(150,75,$handle),6) $100 = Hex(PixelGetColor(161,75,$handle),6) For $i = 0 To 100 Step 10 If $i = "FF0000" Then GUICtrlSetData($Progress, $i) GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) EndIf Next EndFunc Edited June 24, 2009 by Vitas _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
Tvern Posted June 24, 2009 Share Posted June 24, 2009 (edited) Func HP() For $i = 1 To 107 If Not (Hex(PixelGetColor($i+54,75),6) = "FF0000") Then ExitLoop Next GUICtrlSetData($Progress, ($i-1)/1.06) GUICtrlSetState($Checkbox1, $GUI_UNCHECKED) EndFunc Edited June 24, 2009 by Tvern Link to comment Share on other sites More sharing options...
d0n Posted June 24, 2009 Author Share Posted June 24, 2009 thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now