Jump to content

how to identify auto it script issues


sat6804
 Share

Recommended Posts

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

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
Link to comment
Share on other sites

  • Developers

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

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