[Gambas-user] Desktop.Find

Stephen Bungay sbungay at ...981...
Thu Aug 18 18:32:03 CEST 2011


On 08/18/2011 11:56 AM, Stephen Bungay wrote:
> On 08/18/2011 11:44 AM, Benoît Minisini wrote:
>>> Hi folks! I need some help.
>>>
>>> Gambas 2.23
>>>
>>> Problem: Desktop.Find is not finding a window that is indeed appearing
>>> on the desktop. I personally can see it and it has the correct title,
>>> therefore it is indeed there, and hence the need for some assistance
>>> trying to figure out WHY Desktop.Find can't see what I see....er.... or
>>> something to that effect. Anyway....
>>>
>>> Instantiating a VLC instance using SHELL with the following procedure
>>> (ignore the SUB's parameter list, I have the parameters to SHELL
>>> hard-coded for the moment and am passing in dummy values from the
>>> calling SUB)
>>> '*
>>> '* NOTE! mpProcessHandle is declared at the class level AS Process.
>>> '*
>>> PUBLIC SUB PlayVideo(pFileName AS String, pPlayerTitle AS String)
>>>      DIM aHandle AS NEW Pointer[]
>>>      DIM iHandle AS Integer
>>>
>>>      mpProcessHandle = SHELL "vlc --intf rc --video-title Camera0
>>> ~/TestVideo.avi" FOR READ WRITE
>>>
>> You have to wait a little there (with SLEEP) because the vlc window will not
>> be visible immediately just after you run the process.
>>
>> Regards,
>>
> Hi Benoit!
>
> While I did not use SLEEP I did put a break point on the line that does
> the Desktop.Find, and allowed execution to proceed when  the window
> appeared. I'll try SLEEP in conjunction with the breakpoint just to
> test.  Will let you know.
>
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
   The folks who wrote VLC are not *really* changing the title of the 
window, although it appears to the end-user that they are because the 
text in the drag-bar is showing "Camera0". To test the theory I changed 
the search parameter for Desktop.Find to "VLC media player" and found 
the window. Now the question is how can I get around their deception?





More information about the User mailing list