Jump to content
Sign in to follow this  
aisc

Iterate through windows

Recommended Posts

aisc

Newbius of newbs here. Well, I'm a decent programmer, but brand spanking new to AutoIt. :)

Anyhoo... I'm trying to figure out how to iterate through a number of windows where I may or may not know the window title. I assume knowing the window title would make it easier. But basically, I want to hit all the open windows and click known x/y coordinates. I have figured out the clicking coordinates part, but not how to iterate through the windows. Especially if I don't know the window title at design time.

L'il help? :)

Thanks,

aisc

Share this post


Link to post
Share on other sites
cageman

the function winlist() returns all windows.

so:

$windows=winlist()
for $i=1 to $windows[0][0]

$array[i][0] = ith window title
$array[i][1] = ith window handle (HWND)

Next

edit:

you can find things like these in the helpfile. It even tells you how to loop through all windows.

Edited by cageman

Share this post


Link to post
Share on other sites
aisc

the function winlist() returns all windows.

so:

$windows=winlist()
for $i=1 to $windows[0][0]

$array[i][0] = ith window title
$array[i][1] = ith window handle (HWND)

Next

Sweet! Exactly what I was looking for... thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×