Subject: | Re: enumWindowHandles(winHandles)
| Date: | 19 Dec 2018 06:20:38 -0400
| From: | "Thies Grimm" <thies.grimm@t-online.de>
| Newsgroups: | pnews.paradox-programming
|
Hello Robert,
first find the Classname of your program
(use enumWindowNames("tblClassNames.db") todo so)
For Notepad the Classname is Notepad.
then start enumWindowHandles(winHandles, "Notepad")
the dynArray now should be very small, so it is easy to look for your value
Have fun!
Thies
to do: do!
Robert MacMillan <macfam@bigpond.net.au> wrote:
>This has to be so simple but I cant quite figure out how to do it.
>
>This function generates a Dynamic Array with a Key - which is the
>Windows Window ID and the Value which is the name of the window. How can
>I parse the array for the Window Name and extract the Key Value to pass
>to a Windows API Sendmessage call to the particular window.
>
>Surely there is some way easy way to search the array, short of dealing
>with it item by item, to find a specific Window Name and the
>corresponding Key which is the internal Windows ID. So lets say I want
>to find the window called, in the values, for example "Untitled -
>NotePad" and its associated Windows ID. In my case there will only be
>one window at a time open with the correct value whereas of course could
>be several NotePad windows open at one time.
>
>There is a function called indexOf ( const value AnyType ) LongInt but
>that does not work to locate a value which is the Windows Window
>Destripter - in text - and then return the Key.
>
>I can stick the array in a table and then do a locate but I would really
>like to do the process entirely from the Dynamic Array but cant figure
>out how.
>
>Thanks
>
>Robert
|