Post Reply 
MOUSE returns Invalid Input
12-14-2013, 09:16 PM (This post was last modified: 12-14-2013 11:41 PM by Han.)
Post: #4
RE: MOUSE returns Invalid Input
Did you check to see if MOUSE() returned an empty list? The very first instance of MOUSE() may very well return an empty list, in which case L0(1,1) and L0(1,2) would cause errors.

Code:

L0:=MOUSE();

// check if we have valid mouse input
IF (SIZE(L0(1)) OR SIZE(L0(2))) THEN

  // handles first mouse
  IF SIZE(L0(1)) THEN
    // code here for mouse 1
  END;

  // handles second mouse
  IF SIZE(L0(2)) THEN
    // code here for mouse 2
  END;

END;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: MOUSE returns Invalid Input - Han - 12-14-2013 09:16 PM
RE: MOUSE returns Invalid Input - Damien - 12-14-2013, 10:53 PM
RE: MOUSE returns Invalid Input - Snorre - 12-20-2013, 04:34 PM



User(s) browsing this thread: 1 Guest(s)