As you've already found, FindWindowLike() returns a list of all open windows of that type, and after a quick test, they are returned in the order of most recently opened to first opened:
Code:
my @window = FindWindowLike(0, "Notepad", "");
print "$_\n" for @window;
Open one window:
8455346
2nd window opened:
7931554
8455346
3rd:
11731214
7931554
8455346
Differentiating between the windows other than the order they were opened is something I don't have time to review the docs for right now, so you may want to look to see if there are other identifiers or not.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.