Jump to content

Does anyone get this upon exit


Go to solution Solved by guinness,

Recommended Posts

Posted (edited)

I have some simple code, but exits oddly with "!>07:43:31 AutoIt3.exe ended.rc:-1" before ">Exit code: -1    Time: 2.645"

_Exit()

Func _Exit()
    Exit MsgBox(4096, '', 'Exit', 2)
EndFunc   ;==>_Exit

If the timeout is removed then it exits as expected.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted

JohnOne,

#include <Constants.au3>

_Exit()

Func _Exit()
    Exit MsgBox($MB_SYSTEMMODAL, '', 'Exit', 2) ; Help file say >> Failure: Returns $IDTIMEOUT (-1) if the message box timed out. 
EndFunc   ;==>_Exit

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Solution
Posted

It's because the value is less than 0.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

JohnOne,

 

  Quote

But do you know why the red warning

Starting SciTE console lines with certain characters gives coloured text (and other effects) - try running this: ;)

ConsoleWrite('! = Bold Red' & @LF)

ConsoleWrite('> = Blue' & @LF)

ConsoleWrite('- = Orange' & @LF)

ConsoleWrite('+ = Green' & @LF)

ConsoleWrite('(5) : = Red (jump to line 5 when double-clicked)' & @LF)

ConsoleWrite('Start with String or Integer then ' & @TAB & '11' & ' = Pink (jump to line 11 when double-clicked)' & @LF)

ConsoleWrite('(' & @ScriptLineNumber & ') : = Red (jump to line ' & @ScriptLineNumber & ' when double-clicked)' & @CRLF)
M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Moderators
Posted

JohnOne,

Understood - I used to have the same reaction until I realised why it happened. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Moderators
Posted

JohnOne,

The colouring is internal to SciTE and nothing to do with AutoIt at all. That is why it seems odd in the case you found - Autoit is not erroring, it is just SciTE noting that the console line begins with "-" and colouring it accordingly. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

- when used to initiate writing to the console - Orange

error code

< 0 - red

0    - blue

> 0 - orange

what is the confusion ?

Edited by PhoenixXL

My code:

  Reveal hidden contents
PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

  • Moderators
Posted

JohnOne,

it looks as if AutoIt3Wrapper adds a specific leading character depending on the error code received as the script exits. I will try and find the specific code later - unless Jos jumps in first. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

0    - blue

0 - Green

blue was due an old modification I did to the lua files probably that I don't remember

Edited by PhoenixXL

My code:

  Reveal hidden contents
PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Posted
  On 8/3/2013 at 7:48 AM, JohnOne said:

Cheers M, I get that and use it a lot for debugging, '!' normally for when something undesirable occurs.

But when I see red in the scite console regarding AutoIt, the head bell rings and I start looking for what went wrong you see.

.

i learned to ignore scite console. as long as the script runs, it's good for me. i just take it as a hint.

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

  • Moderators
Posted

JohnOne,

I found the code in AutoIt3Wrapper: :)

Switch $rc
    Case 0
        ConsoleWrite("+>" & $text & "rc:" & $rc & @CRLF)
    Case 1
        ConsoleWrite("->" & $text & "rc:" & $rc & @CRLF)
    Case Else
        ConsoleWrite("!>" & $text & "rc:" & $rc & @CRLF)
EndSwitch
M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...