Jump to content

doesn't make sense


Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...