shellprg1.InitializeDoNotHandleQuotes("shellprg1", pathprog, Array(Null))
shellprg1.Run(-1)
'get windows open
Sleep(500) '< Is necessary to give the program time to start up
Dim WU As JavaObject
WU.InitializeStatic("com.sun.jna.platform.WindowUtils")
Dim Lw As List = WU.RunMethod("getAllWindows",Array(True))
For Each JO As JavaObject In Lw
Log(JO.RunMethod("getTitle",Null))
If JO.RunMethod("getTitle",Null).As(String) = "Menu di Attivazione" Then
attprog1=True
Dim awtrect As JavaObject = JO.RunMethod("getLocAndSize", Null)
Log(awtrect)
Dim xpos As Int = awtrect.GetField("x") + 200
Dim ypos As Int = awtrect.GetField("y")
'awtrect.SetField("x", Array(xpos))
awtrect.RunMethod("setLocation", Array(xpos, ypos)) '<<<<<<<Not work
Exit
End If
Next
Wait For shellprg1_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)