Help with if statements


    Jun 09 2011 | 7:16 pm
    Hello,
    I need to specify a range of x, y coordinates on a touch screen ie, if a touch event occurs between pixels x100 and x150 and y500 and 450 then something happens.
    I have tried the following
    if $i1 > 100 || $i1 < 150 then $i1
    This seems to do nothing to the incoming integer. Is there a "between" type function for the if object?

    • Jun 09 2011 | 7:34 pm
      The "split" object does just that!
    • Jun 09 2011 | 8:50 pm
      Here's one way
    • Jun 09 2011 | 9:13 pm
      The probelm is the logical distinction between 'or' and 'and'; all integers are either >=100 OR 100 AND 100 && $i1
      Brendan
      [edit] just looked at Simon's response, doh.....
      ps, did I leave enough space between "and and 'and'" ;)
    • Jun 09 2011 | 9:49 pm
      @n00b_meister - Har har do that space/syntax tango all the time, part of the fun... err maybe ;-)
    • Jun 10 2011 | 8:57 am
      Perfect, thanks people