shx Posted December 11, 2005 Share Posted December 11, 2005 $timeout = WinWaitActive("SomeWindow", "", 2);times out after 2 secondsIf $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. ThanksSteven Link to comment Share on other sites More sharing options...
shx Posted December 12, 2005 Author Share Posted December 12, 2005 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. ThanksStevenanybody that can help? Link to comment Share on other sites More sharing options...
nfwu Posted December 13, 2005 Share Posted December 13, 2005 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."); } } TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now