Jump to content

Recommended Posts

Posted

I have a modest script that does a bunch of directory searches, looking for modified files, and it ran fine for years on a Windows Server 2003 system.  I moved it to a Server 2008 system, where is generates "Autoit Error" regarding a subscript error and a line line number (in the compiled EXE).  It only does this when the program is run through the Scheduled Tasks method.  Running directly works fine as either an EXE or AU3 file.

Besides putting a bunch of writes to a log file at every array use, is there a way to reverse compile the EXE to see where the error is created?  I know that the Task Scheduler can't interact with the desktop, but this script doesn't do anything like that.  I've done the obvious thing of increasing all my array declaration dimensions.

Posted (edited)

Scheduled tasks can be set to run on a user profile interactively (desktop).

Are you working with mapped drives?  If so, and you are not running on your user profile, you need to make sure to map them.  Session 0 (where the default tasks will execute) does not include any of your network drive mappings.

Without the script, I can only state what you would like to avoid...checking the ubounds of an array prior to using, and logging when it's not.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Posted

I couldn't find a spot early enough in the code to actually print a log entry, so I think it might not like one of the include files?  Rather than spin my wheels too long, I changed the script to run forever with a long sleep and testing the system time.  Works as desired.

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