Jump to content

Script abnormal exit.


Recommended Posts

I been fighting with this now for hours.

When part of my script includes some code as an included file, it runs as expected.

When the code from the include is pasted to the end of the script ( and the #include directive commented out) the the script crashes unexpectedly.

The include file is APIFileReadWrite.au3

This is my script. SavePrtScBMP.au3

Any Ideas ?

eltorro

Edited by eltorro
Link to comment
Share on other sites

  • Moderators

May be a silly question, but did you bother to do any error handling in the DLL Calls? I see it in a few places (SetError(etc, etc), but no return for the errors.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

May be a silly question, but did you bother to do any error handling in the DLL Calls? I see it in a few places (SetError(etc, etc), but no return for the errors.

There's a log file.

_BinaryFileWrite($hFile, $FileHead)
        If $DEBUG Then
            _FileWriteLog($LOG,"Error Status: "&@error &@LF)
            _FileWriteLog($LOG,"File header written" & @LF)
        EndIf

Many debug statements.

Edited by eltorro
Link to comment
Share on other sites

  • Moderators

There's a log file.

_BinaryFileWrite($hFile, $FileHead)
        If $DEBUG Then
            _FileWriteLog($LOG,"Error Status: "&@error &@LF)
            _FileWriteLog($LOG,"File header written" & @LF)
        EndIf

Many debug statements.

Yeah, I noticed that when I looked at the regular file, I hadn't seen anything but the #include file at that point, thus my "May be" statement... I knew you liked to debug after seeing alot of your scripts.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I knew you liked to debug after seeing alot of your scripts.

Better safe than sorry.

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