Jump to content

Recommended Posts

Posted

Hi All,

I have created 50 autoit .exe file for pdf comparison while comparing pdf we facing some issues. while continuously executing script , at time system autoamtically hangs ,or not locating any other buttons. how to resolve this issue?/

 

Thanks,

Sat6804

Posted (edited)

Let us ask the crystal ball and see if we can find the answer....

.....

....

The crystal ball does not know.

Post some code that we can look at or use some debugging code when a function is called and when the script is doing something. Ex:

#include <Date.au3>

Global const $LOG_FILE = @ScriptDir & "\Logs\Debug.log"
Global $hWnd_notepad

LogFileWrite("Opening application Notepad" & @CRLF)

ShellExecute("notepad.exe")

LogFileWrite("Waiting for notepad" & @CRLF)

Do
    Sleep(100)
    $hWnd_notepad = WinGetHandle("Untitled - Notepad")
Until (WinExists($hWnd_notepad))

LogFileWrite("Activating Notepad" & @CRLF)

WinActivate($hWnd_notepad)

LogFileWrite("Waiting for notepad to be active window" & @CRLF)

WinWaitActive($hWnd_notepad)

LogFileWrite("Appending some text" & @CRLF)

Send("This is some text")

LogFileWrite("Closing notepad without saving" & @CRLF)

ProcessClose("notepad.exe")

Func LogFileWrite(Const ByRef $sMessage)
    FileWrite($LOG_FILE, _NowCalc() & " " & $sMessage)
EndFunc

 

Edited by InunoTaishou

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
×
×
  • Create New...