not sure what your aiming for here. You are starting two while loops but only closing one. the loop for the get msg was never closed with WEnd. Do you know the name of the window your sending to? If so have your tried to send to the control of that window?
Don't know what you expect from your code. But I do know that you would get some clues if you tidied it up. SciTe4Autoit has a nice tool to help you out. CTRL+T (tidy in the tools menu).
It would also help the rest of us if you used the AutoIt tag around your code when posting.
Now, does this code look right to you?
I think you will get stuck in the last while loop. Or did the code crash and burn because you did not provide the closing WEnd?
Use the button with an A on in the browser editor.
can any one see whats wrong with it?
Did you see my above post (Post # 2). None of us know exactly what you're trying to do ... When do you want the bottom code ran? After you click ok?
Seems as if you are trying to have a dialog that will take a user id and pswd then send it to another window. If so doesn't seem like you need the GUI open anylonger and you can close it by exiting the first loop. I am not sure what your doing with the pixelchecksum. But it will only happen when you click the exit button.
It won't do the pixelchecksum with the ok button because the pixelchecksum is outside the gui loop. It won't do it until the gui closes. If you don't need the gui then include a exitloop for the okbtn case statement. That will exit the gui loop to preform other operations after pressing ok.
If the login is in a seperate window you can use a winwaitclose or winwaitnotactive to check when a login window is not active anymore as well. Or you could use a winwaitactive to see when a specific window becomes active.
If I'm wrong and you need the gui to remain active if you move the pixelchecksum statement up to inside the okbtn case statement it will then do them on pressing the OK.