Jump to content

How to check that a tabcontrol is active


Recommended Posts

Hi,

I have the following problem:

I am scripting an application that uses a number of tabcontrols. The pages of the tabcontrols are created the first time the tab is shown. The creation of the tab can take some time because it calls backend processes to retrieve the data shown in the tab. Is there a way to pause the script till the tab has been created? The problem is that the name of the window does not change when changing tab's.

Jochen.

Link to comment
Share on other sites

I have looked at the library an can change tabs etc. The problem is that I need something like WinWaitActive for the Tab. I can only proceed after the Tab has been fully created until then the script should be paused. I have not found something like that in the library, or am I missing something?

Link to comment
Share on other sites

can u post ur script?

I think it's all about events

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Link to comment
Share on other sites

I have looked at the library an can change tabs etc. The problem is that I need something like WinWaitActive for the Tab. I can only proceed after the Tab has been fully created until then the script should be paused. I have not found something like that in the library, or am I missing something?

Then use GUIRegisterMsg() and look at MSDN what tab control message is the right for your script.

Link to comment
Share on other sites

I have looked at the library an can change tabs etc. The problem is that I need something like WinWaitActive for the Tab. I can only proceed after the Tab has been fully created until then the script should be paused. I have not found something like that in the library, or am I missing something?

Welcome to the forum. If the problem is you need to wait until the controls on the tab become enabled before you proceed with your script, then you can use ControlCommand. For example, if the next line in your script types data in an edit box, do something like this:

_Tab_SetCurSel($hTab, 1)
do
  Sleep(250)
until ControlCommand("My Window", "My Text", "Edit1", "IsEnabled")

This will wait until the edit control is created and enabled before proceeding.

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...