Jump to content
Sign in to follow this  
DukeRheum

ERROR: _WinWaitActive(): undefined function.

Recommended Posts

DukeRheum

We have just begun working with AutoIT to try and compile some scripts. Using the AU3 Record tool, however, we seem to run into the same error regardless of what series of functions we record. The code never compiles due to the following, "ERROR_WinWaitActive(): undefined function." This is the repeated error we get whenver attempting to use the record tool. Perhaps you must intialize a destination folder in the beginning for the WinWait functions to operate properly, but I must say I am not quite sure what is causing this error. If anyone could offer any insight, it would be most appreciated. Thank you!

Share this post


Link to post
Share on other sites
bogQ

try to edit script and delite all _ in _WinWaitActive()

so use only WinWaitActive()

that is replace all _WinWaitActive( with WinWaitActive(

if it still dont work post the script that AU3 Record produced so that anyone can take a look at it

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
DukeRheum

I tried removing them, but the error message is still returned just without the _ in the function. So, I now get "ERROR: WinWaitActive(): undefined function."

Share this post


Link to post
Share on other sites
bogQ

post the script so that we can take a look at it


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
water

IIRC it is a bug in AU3Recorder. The recorded script has a function WinWaitActive but it misses the underscore in the name. Add the underscore to the function name.

Edit: I had this in mind but noticed that it is talking about the same error message but a different function - _AU3RecordSetup()

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
DukeRheum

Below is the error which I receive...thanks for taking a look...

Share this post


Link to post
Share on other sites
DukeRheum

#region ---Au3Recorder generated code Start (v3.3.7.0) ---

WinWaitActivate("classname=Shell_TrayWnd","")

MouseClick("left",143,8,1)

WinWaitActivate("Mozilla Firefox Start Page - Mozilla Firefox","")

MouseClick("left",596,95,1)

Send("vml?ace?duhs?duke?edu?php{SHIFTDOWN}m{SHIFTUP}y{SHIFTDOWN}a{SHIFTUP}dmin{ENTER}")

WinWaitActivate("Authentication Required","")

Send("userdata{TAB}{SHIFTDOWN}n{SHIFTUP}u{SHIFTDOWN}l{SHIFTUP}l01{SHIFTDOWN}1{SHIFTUP}")

MouseClick("left",251,130,1)

WinWaitActivate("tempserver.tower.edu / localhost | phpMyAdmin 3.5.2.2 - Mozilla Firefox","")

MouseClick("left",397,135,1)

MouseClick("left",71,284,1)

WinWaitActivate("tempserver.tower.edu / localhost / userdata | phpMyAdmin 3.5.2.2 - Mozilla Firefox","")

MouseClick("left",694,158,1)

MouseClick("left",423,664,1)

MouseClick("left",404,684,1)

MouseClick("left",312,694,1)

MouseClick("left",310,896,1)

MouseClick("left",593,248,1)

WinWaitActivate("File Upload","")

MouseClick("left",63,297,1)

MouseClick("left",144,111,2)

MouseClick("left",144,78,2)

MouseClick("left",203,205,2)

WinWaitActivate("tempserver.tower.edu/ localhost / userdata | phpMyAdmin 3.5.2.2 - Mozilla Firefox","")

MouseClick("left",268,946,1)

#endregion --- Au3Recorder generated code End ---[/autoit]

Share this post


Link to post
Share on other sites
water

Below ... do I miss something or did you forget to attach your screenshot?

Edit: Sorry, was too fast ...

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

Looks like function WinWaitActivate is missing. Search the forum for this function and add it to your script.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
bogQ

Func _Au3RecordSetup()
    Opt('WinWaitDelay',100)
    Opt('WinDetectHiddenText',1)
    Opt('MouseCoordMode',0)
EndFunc
Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc
_AU3RecordSetup()

this shud go on top of the script, im not shure how you use recorder, from scite or from exe

but when you save script, edit it with scite and if its missing this lines on top of it, add them, then try to compile or run.

Edit

and now im confuzed to why your getting WinWaitActive() when command is WinWaitActivate, that 2 commands are diffrent things

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
DukeRheum

I apologize. I was reading the error wrong. You're right. It was WinWaitActivate, not WinWaitActive. I went back to the scite, and I added in the code above the recording, and it seemed to work fine. Thank you both for your help!

Share this post


Link to post
Share on other sites
FireFox

Question already asked... please make a forum search before posting.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  

×