Send bang with and without change in mousestate

    Nov 08 2013 | 5:20 am
    Hi there,
    Another undoubtably simple problem, but one which i've searched the forums and can't work out.
    I'm trying to hide the cursor when it moves over an LCD. When it leaves the LCD I want it to reappear. To do this i'm trying to connect the mouse X, Y to the (; max hidecursor) and (; max showcursor) commands. So, when there is any movement in either the X or Y cords I want to send a bang to the (hidecursor) and when there is no movement in either I want to send a bang to the (showcursor). The former is easy enough, but what is a good way to send a bang from no change?
    Thanks a lot for any help!

    • Nov 08 2013 | 6:23 am
      If the LCD object suppose to remain in its place, you can use mousestate to find the borders of it, and define the 2 areas using and && object. See an example attached (the coordinates are specified within the comparison objects, and are depending on your screen resolution) But I don't know a way to make it global (so it can be used on other screens), because the "patcher_rectangle" attribute, which tells you the object location and size in the inspector, cannot be accessed with a "get" message or such. Another idea is to use the LCD border coordinates to determine when you're about to leave its area, but unfortunately the polling of the mouse position is quite slow.
    • Nov 08 2013 | 6:57 am
      Hey thanks a lot. Yeah, I initially wanted to use the mouse position within the LCD as the trigger but the polling is just too slow.
      The mousestate option is problematic as the LCD wont be in the same place.
    • Nov 08 2013 | 7:02 am
      A simple mode 1 command makes the mousestate relative to the patcher.
    • Nov 08 2013 | 7:14 am
      great. good to know!