sat6804 Posted February 18, 2016 Share Posted February 18, 2016 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 Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 18, 2016 Share Posted February 18, 2016 (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 February 18, 2016 by InunoTaishou Link to comment Share on other sites More sharing options...
Developers Jos Posted February 18, 2016 Developers Share Posted February 18, 2016 use for basic debugging: Opt("TrayIconDebug", 1) ;0=no info, 1=debug line info Or else start using a logfiile. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now