1xcalibur1

AU3Recorder - _WinWaitActivate ERROR

10 posts in this topic

Hello,

I'm new to AutoIt and I've been trying for hours to record a simple script that will launch FF and log into some website.

I'm not sure why but doesnt matter what I do I keep getting "_WinWaitActivate...Error: Unknown function".

What's wrong? :-\

Thanks,

X

Share this post


Link to post
Share on other sites



It looks like you're using a UDF if you precede the function name with an underscore. Check to see if you need to #include a file for it. If that doesn't solve it, post your code (or a sample) that causes the error.

Share this post


Link to post
Share on other sites

It looks like you're using a UDF if you precede the function name with an underscore. Check to see if you need to #include a file for it. If that doesn't solve it, post your code (or a sample) that causes the error.

My friend,

I have no idea what you just said...

But here's my recorded code for going to the start menu, typing "firefox" then typing a new URL:

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

_WinWaitActivate("Start menu","All Programs")

MouseClick("left",22,498,1)

Send("firefox{ENTER}")

_WinWaitActivate("Google - Mozilla Firefox","")

MouseClick("left",612,52,1)

Send("soluto?com?login{ENTER}")

#endregion --- Au3Recorder generated code End ---

Oh and I'm afraid it still gives me the same ERROR as before.

Share this post


Link to post
Share on other sites

When using the AU3Recorder, you have to check the checkbox for "Generate Internal Functions" or it won't create the function for _WinWaitActivate.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

When using the AU3Recorder, you have to check the checkbox for "Generate Internal Functions" or it won't create the function for _WinWaitActivate.

Now it gives me a "AU3RecordSetup ERROR" :D

Code:

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

#region --- Internal functions Au3Recorder Start ---

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()

#endregion --- Internal functions Au3Recorder End ---

_WinWaitActivate("Start menu","")

MouseClick("left",21,502,1)

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

Send("firefox{ENTER}")

_WinWaitActivate("Google - Mozilla Firefox","")

MouseClick("left",374,64,1)

Send("soluto.com/login{ENTER}")

#endregion --- Au3Recorder generated code End ---

Share this post


Link to post
Share on other sites

When using the AU3Recorder, you have to check the checkbox for "Generate Internal Functions" or it won't create the function for _WinWaitActivate.

LOL!

NVM, I fixed it!

Just removed the "_" and it went PERFECT!

Thank you guys a GAGILLION!

Share this post


Link to post
Share on other sites

When using the AU3Recorder, you have to check the checkbox for "Generate Internal Functions" or it won't create the function for _WinWaitActivate.

I'm using the latest AutoIT (3.3.8.1) and have the same problem, but Au3Record.exe (3.3) shows no "Generate Internal Functions" option in its window. Where is this option located?

As a work-around, is removing the prepended underscore (_WinWaitActivate) OK or does it have side effects?

Thank you.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I'm using the latest AutoIT (3.3.8.1) and have the same problem, but Au3Record.exe (3.3) shows no "Generate Internal Functions" option in its window. Where is this option located?

As a work-around, is removing the prepended underscore (_WinWaitActivate) OK or does it have side effects?

Thank you.

You have to start the AU3Record program from inside SciTE, with an AutoIt script open in it, or start the recorder with the /o option to get that checkbox to appear.

EDIT: If you start it externally from SciTE with the /o option, it doesn't seem to actually generate anything as far as I can tell. It just closes after hitting the Stop Recording button and gives you nothing back. So, the best way to use it to properly generate a script is starting it from within SciTE.

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Good to know. Thanks.

Share this post


Link to post
Share on other sites

Newbie. I ran AuRecorder (externally) with the /o option and it comes up with the 'Generate internal functions' checkbox (wh I checked and started the recorder function) . However it does not record any keyboard,/move movements. Where am I going wrong?

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