Jump to content
Sign in to follow this  
brodie28

doesn't make sense

Recommended Posts

brodie28

Msgbox(0, "title", $nag)
    Msgbox(0, "title", $up)

If $nag > $up then
    
    Do

Msgbox(0, "title", "Flag 5")
    
    $o_Form = _IEFormGetCollection($o_IE, 1)
    
    $uupgrade = _IEFormElementGetObjByName ( $o_Form, "unitupgrade")
    
    $uupgrade.click
    
    _IELoadWait ($o_IE)
    
until $up > $nag

endIf

The first mesage box comes up with 2237414 and the second with 615000.

This shows that $nag is clearly higher than $up, however the message box with flag 5 never comes up, and none of the other code gets executed. I have no idea why this if statement seems to not be working.

I also tried this with a while/wend loop and it never got executed either.

Share this post


Link to post
Share on other sites
MHz

Perhaps you are evaluating a string?

; True or False
$string = True

If $string Then
    $nag = '2237414'
    $up = '615000'
    MsgBox(0, '', $nag & @CRLF & $up)
Else
    $nag = 2237414
    $up = 615000
    MsgBox(0, '', $nag & @CRLF & $up)
EndIf

If $nag > $up then
    MsgBox(0, '', '$nag is larger')
Else
    MsgBox(0, '', '$nag is Smaller')
EndIf

Share this post


Link to post
Share on other sites
SmOke_N

Is $nag and $up actually a string?

Try this:

If Number($nag) > Number($up) Then

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.