Jump to content

Error Code 0


Recommended Posts

  • Moderators

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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