Jump to content

Search the Community

Showing results for tags '@error'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Found 11 results

  1. File- and stdout/-err (console) output of messages, regular- and COM Object errors, exit method and -code, etc. Just call _AUERLO_Log() after to be logged functions (no parameters required if preceding function returns @error on failure). Or replace ConsoleWrite() (and SciTE trace lines) by _AUERLO_Log() for existing scripts. _AUERLO_FileRead() and _AUERLO_View() to display error log file contents (or import as CSV file to Microsoft Excel for example). Register custom functions to adjust date/time format and replace or add output functionality (no UDF source code modification
  2. I've encountered a problem with a single file where I cannot retrieve it's Date-time. So far my code has worked well for over 30 files, but this one is a mystery I cannot debug myself due to insufficient Au3 knowledge. In line 11 "_Date_Time_FileTimeToArray" is called and for this particular file it sets the @error to 10. I don't know what that error code means, but it's not set by the _Date functions themselves I think. Overall, it could be a problem caused by any of the functions below, how can I properly debug this? / Does anybody know a what's causing this? _WinAPI_CreateFil
  3. Hi, I have this piece code that works with Excel file and finds the column name where is a specific named range located. Local $Column = Null $Column = _Excel_ColumnToLetter($oWorkbook.Sheets("MySheetName").Range("MyRangeName").Column) If @error Then $Column = Null SetError(0) Else ;Proceed... EndIf It works properly if the named range exists in the Excel file, I do get the column name and the "Proceed" part is correctly executed. If the named range is not present in the Excel file, I would expect the If @error part to set the variable to Null and
  4. Hi all, Bit of a fun one with querying WMI objects and setting errors within a function. Below is example code that I've used from JSThePatriot previous UDFs but the example would apply to many other scenarios. Basically the SetError should be called if $colItems is not an object as a result of the WMI query. This is then used to create a corresponding error message. I've tried disabling WMIC thus forcing it to not be an object, but rather than catching the error and telling me about it, the code simply fails therefore surely making the purpose of the logging useless?? I've exper
  5. Hello, I recently opened a bug report without reading the Helpfile... My bad . After @Melba23's gentle reminder, I was curious about why it was like that. It is about SetError's behaviour. This is the example from the bug report: Example() If @error Then ConsoleWrite("Error" & @CRLF) Else ConsoleWrite("No Error" & @CRLF) EndIf Func Example() SetError(1) Sleep(1000) EndFunc What I tried to do is set Example's (my user defined function's) @error value to 1... but the value set by SetError is cleared after calling a function, I wonder why?
  6. So I made a loop beginning with while $e = 1. It opens a file and searches for a colour in the file, if the colour isn't there $e = 2 so the loop ends and restarts. Instead of that, the loop runs once and then just stops completely, even if the colour is there. Here is what it looks like basically. While $e = 1 OpenPng() $aCoord = PixelSearch ($left, $top, $right, $bottom, 0x3B5E05, 0) If @error Then $e = 2 WEnd How do I make it so the loop restarts if the colour isn't there, but it continues normally if the colour is there?
  7. I did look at the help file and did not see an indicator of the answer. The @error variable that inherits a value when a function produces an error; is this value overwritten as success if a function right below it is successful? It seems that I could possibly check the error value at the end of a UDF if it always maintains an error value once generated, but if its overwritten by successful functions, I would have to check every function call. I find this more relevant for browser automation. i.e. checking every time I navigate.
  8. How should i go about repeating this section if@error? I want it to try again if it can not find the PixelSearch then move on to the next Search. While 1 $cords = PixelSearch(564, 188,710, 350,0x380030) If Not (@error) Then MouseClick("Left",$cords[0],$cords[1],1,1) EndIf If (@error) Then ?????? EndIf
  9. Hello , I was thinking of a situation where a key in a ini file can contain anything, If we were to know if the key does not exists using IniRead, Its not possible to do it without compromising a single possibility... I was thinking that if IniRead were to set @error when a key does not exist, it solves the problem which I mentioned before What do you think? Would you like this feature? TD
  10. Func MyErrFunc() Local $HexNumber If IsObj($oMyError) Then $HexNumber = Hex($oMyError.number, 8) GUICtrlSetData($GreenProgress,"") _RedProgress() GUICtrlSetData($Output,"") GUICtrlSetData($Output, "Intercepted a COM ""Component Object Model"" Error with the computer!" & @CRLF & @CRLF & _ "Description : " & $oMyError.windescription, 10) SetError($HexNumber) EndIf SetError (1) Return EndFunc Has anyone ran into the issue with a COM error crashing your script? The script works and catches the error twice and then the third time it crashes the script "The RPC server is u
  11. Greetings y'all, While tracing an issue flagged by user MagicSpark here: I came across this puzzling AutoIt behaviour: Seterror(1) If @error Then Beep(1111,100) ; this works Seterror(1) If Execute('@error') Then Beep(1111,100) ; this fails Now I'm not sure whether this should be considered a bug or a feature. I presume Execute starts by resetting @error (and @extended) and updates it with a non-zero error code when something fails along the way. Trouble is, this makes evaluation of @error's origiinal content within an Execute envelope impossible, thereby breaking my decryption (see m
  • Create New...