M0E Lnx ha scritto: > Attn Beniot... Please help > > Can you explain how to use the WM_CLASS string to embed an application > using the embedder object? > I did not try this in gambas, but I read the docs. The Desktop.find() method takes "regular expression" parameters, so if you search for a window class, and you do not know the other strings, you should specify them using a pattern:
hPointer = Desktop.Find(".*", "Gpartedbin", ".*") I am not sure if empty strings ("") work, so you should try with ".*" which matches any string. What you receive is an array of all the windows matching your request, so you can try also: hPointer = Desktop.Find(".*", "partedbi", ".*") (note that "partedbi", as regular expression, should match "Gpartedbin", "gpartedbin", and so on... Then you can analyze hPointer.count to see if a meaningful result is returned. If .count is 1, then you are done; hPointer[0] is the value you need to embed. I opened a shell, and typed: xprop |grep WM_CLASS then clicked in a firefox window, and got: WM_CLASS(STRING) = "firefox-bin", "Firefox-bin" I don't know why there are two strings (class and instance?), but passing "irefox-bin" to Desktop.Find() should work. Hope this is useful - cheers. Doriano Blengino ------------------------------------------------------------------------- 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