[Gambas-user] Problem with EXEC and GB.Desktop

Lewis Balentine lewis at ...3412...
Wed Nov 26 13:45:06 CET 2014


"As a last resort, and if you are almost sure that it is an awful bug, 
you can _send me an e-mail_, but …"
/the challenge is finding the email address.
/

//For anyone interested I have full documentation in the form of a 120 
KB PDF file
but I need an email address to send it to.
//

///----------------------------------------------------------------------------------------------------------/
/ /

//

/' Gambas module file
' uses:
'  gb
'  gb.desktop
'  gb.desktop.x11(automatically selected by gb.desktop)
'  gb.image(automatically selected by gb.desktop)
'  gb.qt4 (alternates are: gb.gtk, gb.gtk3, gb.gui)

Public Sub Main()
   Dim S0, S1, S2 As String
   Dim ww As Integer[]
   Dim n, WinId As Integer

   S0 = "/usr/bin/mate-terminal"
   S1 = "--title=" & Chr(34) & "Exec Terminal" & Chr(34)
   S2 = "DISPLAY=:0.0"
   Exec [S0, S1] With [S2]
   ' at list 0.25 second delay required between exec and Desktop.FindWindow
   ' may vary according to hardware
   Wait 2
   ww = Desktop.FindWindow("Shell Terminal")
   n = ww.Count - 1
   'WinId is the same as xwininfo id
   WinId = ww[n]
   WinId = ww[0]
   Desktop.ActiveWindow = WinId
   Desktop.SendKeys("ls -l \n")
   Quit
End
/----------------------------------------------------------------------------------------------------------/
/

/With ALL component options ww.Count returns 0 although ww[0] holds a 
valid ID.
With ALL component options *ww[0] *generates *“out of bounds” error*..
With gb.gui.opengl (select GTK+3) the program crashes at the first line 
of code.
/

//Lewis Balentine
lewis at ...3412...

//

/
/




More information about the User mailing list