Jump to content

Recommended Posts

Posted

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!

Posted (edited)

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.

 
Posted

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."

Posted

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.

 
Posted (edited)

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

#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]

Posted (edited)

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (edited)

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.

 
Posted

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!

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
  • Recently Browsing   0 members

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