I am adding full screen detection to read the current mouse cursor position by using a timer which works but displays a warning message in the logs. Any assistance for a workaround is appreciated, thanks.
Process globals
B4X:
Dim MousePositionTimer As Timer
Dim temp,robot As JavaObject
Dim x,y As Int
Dim Lbl_PanelTopPosition As Label
Sub MousePositionTimer_tick
x = robot.RunMethod("getMouseX",Null) ' x position
y = robot.RunMethod("getMouseY",Null) ' y position
Lbl_PanelTopPosition.Text = x & " " & y
End Sub
Log:
Waiting for debugger to connect...
Program started.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by anywheresoftware.b4j.object.JavaObject (file:/C:/Dev/B4J/Libraries/JavaObject.jar) to method com.sun.glass.ui.Application.GetApplication()
WARNING: Please consider reporting this to the maintainers of anywheresoftware.b4j.object.JavaObject
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Thanks, that's good to know so we can all can still use this method. I'ld like to add that optional alternatives might be to use the jAWTRobot or the jNativeHook library which also is useful to track mouse events.
@Erel Thanks, I decided in this case to go for a combo with your of course very useful solution and also Roycefers great libraries. That's why I mentioned them