Jump to content
Sign in to follow this  
beachteach

Error Code 0

Recommended Posts

beachteach

When a script terminates that I have compiled I get an message saying that the file exited with an error code of 0.

I can find nothing on error codes in the documentation. Can anyone help me.

Thanks

Share this post


Link to post
Share on other sites
SmOke_N

When a script terminates that I have compiled I get an message saying that the file exited with an error code of 0.

I can find nothing on error codes in the documentation. Can anyone help me.

Thanks

Do you have the script or do we take a guess?

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.

Share this post


Link to post
Share on other sites
Xenobiologist

Do you have the script or do we take a guess?

Hi,

have a look at Exit. You can set set ErrorCode (ExitCode) to ints no floats I guess like 1,2,3 and so on.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
beachteach

Here is the code I am using:

Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)

AutoItSetOption("SendKeyDelay", 25)
Send("{LWINDOWN}r{LWINUP}")
Sleep(500)
Send("c:\docume~1\alluse~1\startm~1\programs\mapmak~1\mapmak~1.lnk")
Send("{ENTER}")
WinWait("classname=#32770", "Continue")
If Not WinActive("classname=#32770", "Continue") Then WinActivate("classname=#32770", "Continue")
WinWaitActive("classname=#32770", "Continue")
Sleep(500)
Send("{ENTER}")
WinWait("Mapmaker's Toolkit - Untitled", "")
If Not WinActive("Mapmaker's Toolkit - Untitled", "") Then WinActivate("Mapmaker's Toolkit - Untitled", "")
WinWaitActive("Mapmaker's Toolkit - Untitled", "")
Sleep(500)
Send("!o")
Sleep(500)
Send("s")
Sleep(500)
Send("!f")
Sleep(500)
Send("x")

It is designed to open a program, complete an install and then turn off the sound in the program. It seems to work fine but I just want to make sure that the error code 0 is not something I need to correct before I send it to a few people.

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

Exit(0) is normally the ExitCode for success! So you won't have to correct that.

So long,

Mega

P.S.: All you can do is add some error handling if something goes not the expected way and then interact on that or end with exit(1) as example.

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.