Sign in to follow this  
Followers 0
Regency

Help with Comparing Variables

6 posts in this topic

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¥á±Ñ
½±½È Ôàä°ÈÜä¤

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Regency

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 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.

Edit: Fixed what i ment

So 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 by Regency

Share this post


Link to post
Share on other sites

Edit: Fixed what i ment

So 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

Share this post


Link to post
Share on other sites

Bump

bump

Share this post


Link to post
Share on other sites

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

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0