DropThemNikes

Pause of multiple?

18 posts in this topic

Hey all.

I used AU3 Recorder to create a simple script.  All I want to do is move the mouse with a script.

IT WAS WORKING. Then one day stopped? I check and it says the script is paused. I unclick the pause to resume the script.  And it doesn't start at all.

I've tried recreating the script. And each new recreation does the same thing?!?!

Why are my scripts pausing? I'm sure there's a hundred posts of this, but I couldn't google any of them.

I'm running AutoLT 3.3.12.0 - From earlier this year before they cancelled AU3 Recorder.

Any ideas would be truly appreciated. THANKS!

 

mmm.au3

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!
Can you please post your script and tell us on which line your script pauses?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

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

EndFunc

Func _WinWaitActive($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 ---

_WinWaitActive("classname=WorkerW","FolderView")
MouseClick("left",816,264,1)
MouseClick("left",803,435,1)
MouseClick("left",745,270,1)
MouseMove(741,360)
MouseDown("left")
MouseMove(741,362)
MouseUp("left")
MouseClick("left",746,297,1)
#endregion --- Au3Recorder generated code End ---

 

I'm not sure where it pauses. As it doesn't seem to run at all?

Thanks!

Share this post


Link to post
Share on other sites

Add

Opt("TrayIconDebug", 1)

at the top of your script and the tray icon will display the number of the currently executed line.
Can you then please modify line

_WinWaitActive("classname=WorkerW","FolderView")

to

_WinWaitActive("[CLASS:WorkerW]", "FolderView")

because - according to the help file - that's the way Autoit expects a classname.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Ok. I've made the changes.  Still appears to pause.

Says Error, line 18 

WinWaitActive($title,$text,$timeout) <-- Something with this line?

Thanks!

Share this post


Link to post
Share on other sites

Can you please post the full output of the SciTE output pane?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

>Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\User_Name\Desktop\mmm.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop

!Restarting :(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\User_Name\Desktop\mmm.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop

Share this post


Link to post
Share on other sites

Which program do you try to automate?
Can you run the AutoIt Window Info Tool to make sure the windows class is correct?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

The goal of this script.  Is to move the mouse back and forth. It can click as well if it has to.  Just on the desktop preferably.

The Autolt window info tool runs.  And shows the Desktop as class: WorkerW

Share this post


Link to post
Share on other sites

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\User_Name\Desktop\mmm.au3" /UserParams    
+>16:46:23 Starting AutoIt3Wrapper v.15.729.1555.1 SciTE v.3.5.4.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\User_Name\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\User_Name\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.12.0)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\User_Name\Desktop\mmm.au3
"C:\Users\User_Name\Desktop\mmm.au3"(26,50) : error: _WinWaitActivate(): undefined function.
_WinWaitActivate("classname=WorkerW","FolderView")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\User_Name\Desktop\mmm.au3 - 1 error(s), 0 warning(s)
!>16:46:23 AU3Check ended. Press F4 to jump to next error.rc:2
+>16:46:23 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 0.5342

 

Share this post


Link to post
Share on other sites

Why is the functions name "_WinWaitActivate"? The code you posted always uses "_WinWaitActive".


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Correct.

I had used _WinWaitActivate to try something else.

Again, here is my current script. Error line 18? 

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

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

Func _Au3RecordSetup()
Opt("TrayIconDebug", 1)
Opt('WinWaitDelay',0)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')')
EndIf

EndFunc

Func _WinWaitActive($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinWaitActive($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---

_WinWaitActive("classname=WorkerW","FolderView")
MouseClick("left",816,264,1)
MouseClick("left",803,435,1)
MouseClick("left",745,270,1)
MouseMove(741,360)
MouseDown("left")
MouseMove(741,362)
MouseUp("left")
MouseClick("left",746,297,1)
#endregion --- Au3Recorder generated code End ---

Share this post


Link to post
Share on other sites

Here's me wanting to do the same thing with the script. I just want to move the mouse.

They use "WinWaitActivate" -- And this code breaks at the same line?

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt("TrayIconDebug", 1)
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $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 ---

_WinWaitActivate("Program Manager","")
MouseClick("left",1890,183,1)
MouseClick("left",1890,183,1)
#endregion --- Au3Recorder generated code End ---

Share this post


Link to post
Share on other sites

The classname is still wrong:

_WinWaitActive("classname=WorkerW","FolderView")

 


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

just change your line of code from

 

WinWaitActive("classname=WorkerW","FolderView")

too

_WinWaitActive("[classname=WorkerW]","FolderView")

 

 

Share this post


Link to post
Share on other sites

No. As I posted above it has to be "[CLASS:xyz]".
Do you guys read the help file? It's all there.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Water, My last post I mispoke.  That was another crap script. 

Here's a "Working" script:

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $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 ---

_WinWaitActivate("Start menu","All Programs")
MouseClick("left",466,-18,1)
MouseClick("left",205,66,1)
_WinWaitActivate("Kronos Workforce Central(R) - Internet Explorer","Address Combo Contro")
Send("14161{TAB}{SHIFTDOWN}h{SHIFTUP}3ll0{SHIFTDOWN}1{SHIFTUP}976")
MouseMove(51,191)
MouseDown("left")
MouseMove(140,182)
MouseUp("left")
MouseClick("left",141,192,1)
#endregion --- Au3Recorder generated code End ---

And then Back to NOT Working:

#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409)  ---

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

Func _Au3RecordSetup()
Opt("TrayIconDebug", 1)
Opt('WinWaitDelay',0)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '00000409' Then
  MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')')
EndIf

EndFunc


Func _WinWaitActive($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinWaitActive($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---

_WinWaitActive("classname=WorkerW","FolderView")
MouseClick("left",816,264,1)
MouseClick("left",803,435,1)
MouseClick("left",745,270,1)
MouseMove(741,360)
MouseDown("left")
MouseMove(741,362)
MouseUp("left")
MouseClick("left",746,297,1)
#endregion --- Au3Recorder generated code End ---

This bottom script breaks at line 18/19?

Thanks guys.

Share this post


Link to post
Share on other sites

That solved it.

_WinWaitActive("[classname=WorkerW]","FolderView")

THANKS SO MUCH!

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