jbskaggs ha scritto:
> I have looked at the embedder example. I have looked at every post on this
> forum on finding the title of the new window.
>
> I cannot figure it out and get it to work.
>
> Could somebody have pity and show me how to get the title of the window when
> I shell to Openoffice and how to give it to the embedder?
>
> JB
>   
You can use xwininfo to look at window information. "xlsclients -al" 
shows many informations about windows.

On my PC I did this test after launching openoffice:

[EMAIL PROTECTED]:/root$ xlsclients -la
Window 0x1c00005:
  Machine:  doripc
  Name:  mrxvt
  Icon Name:  mrxvt
  Command:  mrxvt -xft -xftfm FreeMono -xftsz 11 -vb -geometry 90x30
  Instance/Class:  mrxvt/XTerm
Window 0x120000a:
  Machine:  doripc
  Name:  kicker
  Command:  kicker
  Instance/Class:  kicker/Kicker
Window 0x400001:
  Machine:  doripc
  Name:  Mozilla-Thunderbird
  Icon Name:  icedove-bin
  Command:  icedove-bin
  Instance/Class:  icedove-bin/Icedove-bin
Window 0x1a00001:
''  Command:  /bin/sh /usr/lib/openoffice/program/soffice


Now I see that the window 0x1a00001 is the window I am interested in, so 
I issue:

doripc:~# xprop -id  0x1a00001
WM_COMMAND(STRING) = { "/bin/sh", "/usr/lib/openoffice/program/soffice" }
WM_CLIENT_LEADER(WINDOW): window id # 0x1a00001
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 3979416247

...just to discover that that window seems not to have a name...

So, while a common method to find a window was Desktop.find() (look at previous 
messages in this list), this time may be that doesn't work.
Perhaps you can 'SHELL "xlsclients -la" TO sXls', and then parse sXls to find 
out the window ID.
Desktop.Find() can be used to get all the windows, but then don't know how to 
get more information. One way could be to execute a find, then launch 
openoffice, then do a find again to see what window has been added...

Hope this could help.

Doriano.






-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to