Jump to content

Search the Community

Showing results for tags 'Error Checking'.

  • 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 1 result

  1. I'm wanting to build in some error checking to my GUI and so far I have been able to check to see if one check box is unchecked and if the right input has been entered but what I can't seem to nail down is how to just check if all 3 check boxes are not checked. Here is the code that I have so far. #include <GUIConstants.au3> #include <IE.au3> GUICreate("Drivers/Manuals/Warranty", 280, 110) $Driver = GUICtrlCreateCheckbox("Drivers", 10, 10) GUICtrlSetState(-1, $GUI_CHECKED) $Manual = GUICtrlCreateCheckbox("Manual", 80, 10) $Warranty = GUICtrlCreateCheckbox("Warranty", 150, 10) GUICtrlCreateLabel("Service Tag #:", 10, 45) $Input = GUICtrlCreateInput("", 90, 40) GUICtrlSetState(-1, $GUI_FOCUS) $Submit = GUICtrlCreateButton("Submit", 40, 70, 50) $Exit = GUICtrlCreateButton("Cancel", 150, 70, 50) Local $aAccelKeys[1][2] = [["{ENTER}", $Submit]] GUISetAccelerators($aAccelKeys) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Submit $CBStatus = GUICtrlRead($Driver) If $CBStatus = $GUI_UNCHECKED Then MsgBox(0, "Error", "Pleaes make a selection first") $serv_tag = GUICtrlRead($Input) if not StringRegExp($serv_tag, "^([a-zA-Z0-9]{4}|[a-zA-Z0-9]{6})1$") Then MsgBox(0, "Error", "Service tag must be 5 or 7 alphanumeric characters and end with 1!") Else If IsChecked($Driver) Then _Fire($serv_tag) If IsChecked($Manual) Then _Fire2($serv_tag) If IsChecked($Warranty) Then _Fire3($serv_tag) ExitLoop EndIf Case $msg = $Exit ExitLoop EndSelect WEnd Exit 0 Func _Fire($sServiceTag) $oIE = _IECreate("http://www.dell.com/support/drivers/us/en/04/DriversHome/NeedProductSelection",0 ,1 ,0) EndFunc Func _Fire2($sServiceTag) $oIE = _IECreate("http://support.dell.com/support/topics/global.aspx/support/my_systems_info/manuals?c=us&l=en&s=biz&~ck=ln&lnki=0&ServiceTag=" & $sServiceTag, 0, 1, 0) EndFunc Func _Fire3($sServiceTag) $oIE = _IECreate("http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&cs=555&l=en&s=biz&~ck=anavml&ServiceTag=" & $sServiceTag, 0, 1, 0) EndFunc Func IsChecked($control) Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED EndFunc Any advice would be wonderful.
×
×
  • Create New...