How to disable error pop-up? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

How to disable error pop-up?

17 Sep 2021, 07:23

Hello AHKers,

How do you disable the error pop-up like this?
https://i.imgur.com/gxodxSl.png

I tried using
#ErrorStdOut
and
#Warn All
#Warn UseEnv, Off

but it doesnt work

if nots not possible to disable it, atleast like hide or not show the script when the error occurs.
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: How to disable error pop-up?

17 Sep 2021, 07:28

You could try try. Or perhaps check first with FileExist() if the file you want to run exists.
Much more is hard to say with the info provided.
kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

Re: How to disable error pop-up?

17 Sep 2021, 07:33

gregster wrote:
17 Sep 2021, 07:28
You could try try. Or perhaps check first with FileExist() if the file you want to run exists.
Perhaps there are also other ways, but impossibe to say with the info provided.
should i put all my script inside the try? i tried it but it does not work
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: How to disable error pop-up?

17 Sep 2021, 07:34

I would only take the line that actually causes this error.
kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

Re: How to disable error pop-up?

17 Sep 2021, 07:45

gregster wrote:
17 Sep 2021, 07:34
I would only take the line that actually causes this error.
i see so theres no option for this or atleast hide the script line error?

hopefully they added this feature in the future

Thank you Sir Gregster
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: How to disable error pop-up?  Topic is solved

17 Sep 2021, 07:49

Well, it does hide the error. I thought that was your intention...?!

Compare

Code: Select all

run somefilethatdoesnotexist.exe
and

Code: Select all

try run somefilethatdoesnotexist.exe
Perhaps you should show some code...
kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

Re: How to disable error pop-up?

17 Sep 2021, 07:53

gregster wrote:
17 Sep 2021, 07:49
Well, it does hide the error. I thought that was your intention...?!

Compare

Code: Select all

run somefilethatdoesnotexist.exe
and

Code: Select all

try run somefilethatdoesnotexist.exe
Perhaps you should show some code...
Thank you Sir Gregsters,

a follow-up question, for an alternative too.
Example, is it possible like
IF sample.ddl or ahksameple.exe not exist then close or msg important files missing then close it
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: How to disable error pop-up?

17 Sep 2021, 07:58

Sure.

Code: Select all

try run somefilethatdoesnotexist.exe
catch {
	msgbox some...exe is missing		
	ExitApp
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: wilkster and 328 guests