Sign in to follow this  
Followers 0
IAmTheManYo

Disable Standard "Fatal Error" MsgBox

3 posts in this topic

Let's start by saying what I want to do does not involve code, so there is no code to post. I'm not trying to fix my script.

What I AM trying to do is disable the standard Message Box that AutoIt generates when it tries to parse a invalid line of code, or at least make the script/executable crash/fail silently, or perhaps customize the Message Box to my own verbiage. Is there an AutoIt option for this, or perhaps a up-to-date UDF?

Example - I do the following,

1- Run a bad line of code

2- Autoit generates the following "MsgBox" - "Title: Autoit, Body: Line script errored on/Error message"

3- Script/Executable crashes fatally

What I want to do is NOT have step 2 happen by disabling the auto pop up that AutoIt generates.

What I do NOT want to do is

- Modify any type of code, as this does not involve code. It's an AutoIt feature I want to disable. Perhaps it IS an AutoIt "Opt" - this would be the only exception.

I searched the help file without luck, and also tried a google search with no success. Maybe someone who likes every bit of their code to appear custom shares my frustration and found a way around the annoying default MsgBox and would like to share?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Use jennico's

Works perfectly. Thank you.

or you could just debug your script properly so it doesn't crash.

#include "Excel.au3"

HotKeySet("{INSERT}", "Write")


$h_Atch = _ExcelBookAttach("E:\Application\MicroExcel.xlsx")

While 1
    Sleep(5)
WEnd

Func Write()
    Local $h_Wnd = WinActivate("Microsoft Excel")
    _ExcelWriteCell($h_Atch, "Test", "A9")
EndFunc

Have at it. With the MicroExcel.xlsx OPEN and ACTIVE, the Excel.au3 UDF will crash if you attempt to write to the excel sheet while modifying a cell or inserting text into the "function" input box. Fails at line 454. You wont have any luck because it's not an AutoIt issue - It's an Excel COM/Object handling issue.

Also, if you are that ashamed of using AutoIt maybe you just should switch to a different language.

Tell this to the guy who created a UDF to fix exactly what my complaint was directed towards? Just answer the question next time -- The added "cents" aren't needed. Edited by IAmTheManYo

Share this post


Link to post
Share on other sites

An attitude shown is an attitude deserved. You "assumed" I was ashamed of using a coding language that I've been using for 5 years; shown in my forum join date alone. Your information was useful and you were thanked for it. Your added comments, however, were not appreciated.

Share this post


Link to post
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
Sign in to follow this  
Followers 0