Sign in to follow this  
Followers 0
shx

Newbie question, help is appreciated

3 posts in this topic

$timeout = WinWaitActive("SomeWindow", "", 2);times out after 2 seconds

If $timeout = 0 Then MsgBox(0, "DEBUG", "Window timed out. Please contact the program administrator.")

This I was told was the way to find out if winwaitactive timed out or actually found the window.

My question is how would one do this if using AutoitX from vbscript.

Thanks

Steven

Share this post


Link to post
Share on other sites



This I was told was the way to find out if winwaitactive timed out or actually found the window.

My question is how would one do this if using AutoitX from vbscript.

Thanks

Steven

anybody that can help?

Share this post


Link to post
Share on other sites

I'm not sure for VB, but for C++ it goes like this:

(the same as what you were describing)

//AutoItX Exported Function Declaration in the autoit3.h file:

//AU3_API long WINAPI AU3_WinWaitActive(const char *szTitle, /*[in,defaultvalue("")]*/const char *szText, /*[in,defaultvalue(0)]*/long nTimeout);

#include <autoit3.h>
int main(){
   long result = 0; //declare a variable to store the result
   result = AU3_WinWaitActive( "SampleTitle", "", 10 );
   if (result == 0){
       printf("Timed Out.");
   }
}

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  
Followers 0