Jump to content

Search the Community

Showing results for tags 'seterror'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hi, Im kind of confused with seterror, If I put Sleep SetError is working fine, but without sleep set error doesn't work. please can someone give me a good and easy example. TIA Parameters: code = I don't really understand this, is it ok to put any numbers??? or some numbers represent something? extended = same situation, is it ok to put any integer??? #include <Array.au3> #include <File.au3> $sFilePath = "C:\New Folder" $FLTAR = _FileListToArrayRec($sFilePath = "", "*.pdf", $FLTAR_FILES, $FLTAR_NORECUR, $FLTAR_SORT, $FLTAR_FULLPATH) If @error Then $FLTAR = SetError(1, 0, "0 files for transfer") Sleep(100) If $FLTAR = @error Then MsgBox(0, "$FLTARIf", $FLTAR) Else MsgBox(0, "$FLTARElse", "SUCCESS") EndIf I used 1 and 0 for testing only.
  2. Hello World!!! this is the first time I use Error checking and Im really confused with this, am I doing it correctly?. I check the help file and came up with this #include <MsgBoxConstants.au3> ;1st example Local $hWndR = wtf(WinExists("[CLASS:CalcFrame]")) If @error Then MsgBox($MB_SYSTEMMODAL, "Error", "calculator does not Exist!!!") Else MsgBox($MB_SYSTEMMODAL, "Result", "calculator Exist!!!") EndIf Exit Func wtf($hWndR) If $hWndR < 1 Then SetError(2);where did you get this "2" ElseIf $hWndR > 1 Then SetError(1); and this "1" EndIf Return $hWndR EndFunc ;==>wtf ;~ 2nd Example Local $hWndR = wtf(WinExists("[CLASS:CalcFrame]")) If Not @error Then MsgBox($MB_SYSTEMMODAL, "Error", "calculator does not Exist!!!") ElseIf @error Then MsgBox($MB_SYSTEMMODAL, "Result", "calculator Exist!!!") EndIf Exit Func wtf($hWndR) If $hWndR = 1 Then SetError(2) ElseIf $hWndR = -1 Then SetError(1) EndIf Return $hWndR EndFunc ;==>wtf Please can someone enlighten me...
×
×
  • Create New...