dubi

Why is a window put in front of others?

3 posts in this topic

#1 ·  Posted (edited)

Hi,

 

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?

 

-dubi

 

Edited by dubi

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

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

BeatsPlayer - Music player.

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

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.

Firefox Profile Backup - Backup/restore previously saved profile.

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

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

 

Share this post


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?

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