Sign in to follow this  
Followers 0
Cormin

Cant figure out what's wrong with this expression

2 posts in this topic

#1 ·  Posted (edited)

Help please? I want $check to be +/- 2 of $nCurrent

$check = ClipGet()
   $up = $nCurrent + 2
   $down = $nCurrent - 2
   if $check = >$down And <$up Then
     ...
   Else
     ...
   EndIf
Edited by Cormin

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

oh, less than or equal to...:

$nCurrent = 10

For $i = 5 To 15
    ClipPut($i)
    yourcheck()
Next

Func yourcheck()
    $check = ClipGet()
    If $check <= ($nCurrent+2) And $check >= ($nCurrent-2) Then
        ConsoleWrite("inside: " & $check & @CRLF)
    Else
        ConsoleWrite("outside: " & $check & @CRLF)
    EndIf
EndFunc

output:

outside: 5
outside: 6
outside: 7
inside: 8
inside: 9
inside: 10
inside: 11
inside: 12
outside: 13
outside: 14
outside: 15

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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