Sub NH_NativeMouseClicked(nme As NativeMouseEvent) As Boolean
Log($"nh_NativeMouseClicked(X:${nme.X},Y:${nme.Y},ClickCount:${nme.ClickCount},Button${nme.MouseButton})"$)
'Thread.RunOnGuiThread(True)
If nme.MouseButton == 2 Then
Log("Right mouse button was pressed.")
fx.Msgbox(MainForm, "hello world","")
'x = AwtRobot.RobotMouseCurrentLocation(x)
'y = AwtRobot.RobotMouseCurrentLocation(y)
End If
Return False
End Sub
'Event fired when the NativeHook is unregistered
Sub NH_Unregistered
NH.endNativeMouseInputListener
NH.unregisterNativeHook
Log("NativeHook unregistered")
StopMessageLoop 'No more event loops means this program ends here
End Sub