Jump to content

Why is a window put in front of others?

Recommended Posts



I am controlling a number of windows (something between 2 and 30) by sending information to controls in those windows. I do this with controlsettext, controlclick and controlsend. In other routines I am using the a number of other window related functions: _WinAPI_ProcessGetFilename, WinGetPos, _WinAPI_ProcessGetFilename, _WinAPI_EnumWindowsTop, _WinAPI_GetWindow, _WinAPI_GetWindowText

There is no WinActivate or such in the code. My issue is, that from time to time the order of the windows changes: ie initially it is window 1,2,3,4 etc. and while running the sequence moves to 1,3,4,2 or so. I have no idea what triggers a particular window to move to the front. Sometimes this can even be fairly strong like 10 changes in a second or so. 

Any idea how I can find out how this is triggered?




Edited by dubi
Link to post
Share on other sites

You can place msgboxes next to those lines of code, and see if anything changes. It'll be progressive, only continues after you close the box so, that way you can know what portion of code is doing that, and the msgbox should have the line and the bit of code, so you can know what's what.

Edited by careca

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


Link to post
Share on other sites

Thanks and generally a good idea. Then callenge is that some of the procedures are being processed quite extensively and thus this debugging method is not optimal. In fact I am running up to 20 autoit-exe (compiled codes) in parallel. 

Anyone has an idea if one of the above mentioned calls can invoke a window reshuffling?

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...