Sub Process_Globals
Private robot As JavaObject
Dim timer As Timer
End Sub
Sub AppStart (Form1 As Form, Args() As String)
Form1.Show
Dim jo As JavaObject
jo.InitializeStatic("com.sun.glass.ui.Application")
robot = jo.RunMethodJO("GetApplication",Null).RunMethodJO("createRobot",Null)
timer.Initialize("timer", 5000)
timer.Enabled = True
End Sub
Sub timer_Tick
SendKey(116)
End Sub
Sub Sleep(ms As Long)
Dim jo As JavaObject
jo.InitializeStatic("java.lang.Thread").RunMethod("sleep", Array As Object(ms))
End Sub
Sub SendKey(code As Int)
robot.RunMethod("keyPress", Array As Object(code))
Sleep(100)
robot.RunMethod("keyRelease", Array As Object(code))
End Sub