locked
Programmable mouseclick RRS feed

  • Question

  • How can I create a mouse click by programming?
    Monday, November 15, 2010 4:48 PM

Answers

  • 'You can set the property of Mouse.MouseX and Mouse.MouseY
    'but really all you need to do is call your mouse handling routine

    GraphicsWindow.MouseDown = OnMouseDown

    Mouse.MouseX = GraphicsWindow.Left + 300
    Mouse.MouseY = GraphicsWindow.Top + 200
    OnMouseDown()

    Sub OnMouseDown
     If (Mouse.IsLeftButtonDown = "True") Then
        GraphicsWindow.ShowMessage("This message has been brought to you by a mouse click","")   
      Else
        GraphicsWindow.ShowMessage("This message has been brought to you by a fake mouse click","") 
      EndIf
    EndSub

    'note: GraphicsWindow.MouseX and GraphicsWindow.MouseY are read-only and cannot be set.

    • Marked as answer by litdev Tuesday, November 23, 2010 8:52 PM
    Monday, November 15, 2010 8:36 PM