Regency Posted March 30, 2008 Share Posted March 30, 2008 Umm, I cant seem to get this to compare the pixels that it represents. Some times it works, others it doesnt... Func ScriptCheck1() If $1Color = $2Color and $2Color = $3Color Then ;Restart Script Sleep(10) _IEAction($Gta, "Back") $oRadio = _IEGetObjById($Gta, "ctl00_MainPageContent_rblCarThefts_0") _IEAction($oRadio, "click") $oSubmit = _IEGetObjByName($Gta, "ctl00$MainPageContent$btnCommit") _IEAction($oSubmit, "click") _IELoadWait($Gta) ScriptCheck1() Elseif $1Color <> $2Color and $2Color = $3Color Then ;Insert First Box Click $oSubmit = _IEGetObjByName($Gta, "ctl00$MainPageContent$valCartheft$btn1") _IEAction($oSubmit, "click") _IELoadWait($Gta) _IEQuit($Gta) Elseif $1Color = $2Color and $2Color <> $3Color Then ;Restart Script Sleep(10) _IEAction($Gta, "Back") $oRadio = _IEGetObjById($Gta, "ctl00_MainPageContent_rblCarThefts_0") _IEAction($oRadio, "click") $oSubmit = _IEGetObjByName($Gta, "ctl00$MainPageContent$btnCommit") _IEAction($oSubmit, "click") _IELoadWait($Gta) ScriptCheck1() Endif EndFuncoÝ÷ Ù8^è¬Þ¶aË®*mnëm+"²Ø^¦ºé©j»S+"²Ø^¦,^ËajØ~)ݱ«¢+Ù±½°ÀÌØìÅ ½±½ÈôA¥á±Ñ ½±½È Ìàä°ÈÜä¤)±½°ÀÌØìÉ ½±½ÈôA¥á±Ñ ½±½È Ðàä°ÈÜä¤)±½°ÀÌØìÍ ½±½ÈôA¥á±Ñ ½±½È Ôàä°ÈÜä¤ Link to comment Share on other sites More sharing options...
Regency Posted March 30, 2008 Author Share Posted March 30, 2008 (edited) Can you not compare 3 var? I tried to which it back to 3 variables comparing (with out and) and it stilldoesnt work, when i use the above code, it goes into a infinite loop or redoing the script.. anyone? Edit: 100th Post Woot!! Edited March 30, 2008 by Regency Link to comment Share on other sites More sharing options...
Achilles Posted March 31, 2008 Share Posted March 31, 2008 Notice what you're doing... I don't see a problem but it may be that come of your conditions are never coming true as you would expect If $1Color = $2Color and $2Color = $3Color If all three colors are the same if $1Color <> $2Color and $2Color = $3Color If color two and three are the same but different than color one if $1Color = $2Color and $2Color <> $3Color If color one and two are the same but different than color three From the sounds of it (since you're getting an infinite loop), the second condition is never true. You might want to try a msgbox or a consolewrite too see what you're three pixel colors are just in case you're not reading the right place. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Regency Posted March 31, 2008 Author Share Posted March 31, 2008 (edited) Notice what you're doing... I don't see a problem but it may be that come of your conditions are never coming true as you would expectIf $1Color = $2Color and $2Color = $3Color If all three colors are the sameif $1Color <> $2Color and $2Color = $3ColorIf color two and three are the same but different than color oneif $1Color = $2Color and $2Color <> $3ColorIf color one and two are the same but different than color threeFrom the sounds of it (since you're getting an infinite loop), the second condition is never true. You might want to try a msgbox or a consolewrite too see what you're three pixel colors are just in case you're not reading the right place.Edit: Fixed what i mentSo how would i do a one of the ways you think i could figure it out? Should i put a msg box thing under the first if statement? and have it say the pixels from the pixelget? or how? Edited March 31, 2008 by Regency Link to comment Share on other sites More sharing options...
Regency Posted April 1, 2008 Author Share Posted April 1, 2008 Edit: Fixed what i mentSo how would i do a one of the ways you think i could figure it out? Should i put a msg box thing under the first if statement? and have it say the pixels from the pixelget? or how?Bump Link to comment Share on other sites More sharing options...
Regency Posted April 5, 2008 Author Share Posted April 5, 2008 Bumpbump 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