Jump to content
Sign in to follow this  

Winlist out of index

Recommended Posts



i wrote a little autoit script in the past, which moves some windows.

but i have problem with implementing this in c sharp.

Func Refresh()
            $WinList = WinList("[CLASS:#32770]")
    Func StartUp()
                    For $i = 1 To $WinList[0][0]
                            WinMove($WinList[$i][0], "", 0, 0, 640, 463)

here my c sharp code

static void Main(string[] args)
            AutoItX3 au3 = new AutoItX3();

            // finds 10 windows
            dynamic[,] winlist = au3.WinList("[CLASS:#32770]");

winlist[0,0] tells me it has found 10 windows but i can only access winlist[1,0] , until winlist[2,0] ill get an out of index exception.

what could be the problem ?

and how can i print the title ?


edit :

nvm i got it.

for future problems the array is swaped that means you iterate in c sharp with winlist[0,i]

Edited by kantaki

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.