Jump to content

no sutch function -WindowWaitActivate


Go to solution Solved by Thundagar,

Recommended Posts

i have this code so far some captured using recording (the for loop is set to 1 loop until i can get the rest of script working correctly) When i try to run it i get an error message saying that _WindowWaitActivate function does not exist. do i need to add something to this to make it work? every where i searched for the window wait function it doesnt say i need to add anything so getting a litle confused.

for $i = 1 to 1
    MouseClick("left",91,8,1)
    sleep ( 1000 )
    Send("{CTRLDOWN}c{CTRLUP}")
    sleep ( 1000 )
    _WinWaitActivate("Data Entry - Torp - Asure ID","")
    MouseClick("left",538,93,1)
    sleep ( 1000 )
    _WinWaitActivate("Find","")
    sleep ( 1000 )
    Send("{CTRLDOWN}v{CTRLUP}")
    sleep ( 1000 )
    MouseMove(156,164)
    sleep ( 1000 )
    MouseDown("left")
    sleep ( 1000 )
    MouseMove(155,164)
    sleep ( 1000 )
    MouseUp("left")
    sleep ( 1000 )
    MouseClick("left",291,164,1)
    sleep ( 1000 )
    _WinWaitActivate("Data Entry - Torp - Asure ID","")
    MouseClick("left",56,42,1)
    sleep ( 1000 )
    MouseClick("left",295,88,1)
    sleep ( 1000 )
    _WinWaitActivate("Print Card","")
    MouseClick("left",354,329,1)
    sleep ( 1000 )
    _WinWaitActivate("Lagre filen som","")
    Send("test")
    sleep ( 1000 )
    MouseClick("left",791,504,1)
    sleep ( 1000 )
    _WinWaitActivate("Data Entry - Torp - Asure ID","")
    MouseClick("left",945,367,1)
    sleep ( 1000 )
    _WinWaitActivate("Microsoft Excel - TorpTak.xlsx","")
    MouseClick("left",93,10,1)
    sleep ( 1000 )
    Send("{DOWN}")
    sleep ( 1000 )
next
Link to comment
Share on other sites

Thanks for the welcome :). but when i search for _windowwaitactivate i only find my own post. as i found none before that :/  if search for function not found i find 1000 posts but didnt find one related to the _windowwaitactivate that i could find.. honestly tho i didnt check all 1000 posts :) I did try to google this topic before i joined the forum. but i find lots of information just not anything that has helped me solve my problem. So if any one could just point me in the correct direction i will probably figure it out but not from what i have found so far.

Link to comment
Share on other sites

Your looking for winwaitactive, not windowwaitactive

Actually it's _WinWaitActivate, which is a function the AU3Recorder is supposed to create when you save the recording. It's just a wrapper around winwait and winactivate.

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

Link to comment
Share on other sites

  • Solution

Thanks for the answers did find out what i was missing. and just incase some one else searches I'll add it here :)
This is the code that was added from running the recorder inside the script program and not just the autorecord executable in the autiit folder. 

Oh and yes obviously i did type the title wrong should have been _WinWaitActivate  :doh:

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000414)  ---
#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
    Opt('WinWaitDelay',200)
    Opt('WinDetectHiddenText',1)
    Opt('MouseCoordMode',0)
    Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
    If $aResult[1] <> '00000414' Then
      MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000414->' & $aResult[1] & ')')
    EndIf

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

#endregion --- Au3Recorder generated code End ---
Edited by Thundagar
Link to comment
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
 Share

  • Recently Browsing   0 members

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