Jump to content

Search the Community

Showing results for tags 'timeout reboot gui button'.

  • 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. So I have a program that updates software on an end user device. When it comes time for a reboot it will utilize the following script: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $r = "2" _main() Func _main() $MyGUI = GUICreate("Reboot Needed", 493, 120, 192, 114) $Message = GUICtrlCreateLabel("Windows needs to reboot your system to complete system changes. Please save your work and click" & @CRLF & "Reboot. Or click Delay to Postpone the operation for 30 minutes. You may postpone " & $r & " more times.", 0, 8, 601, 75) $Button1 = GUICtrlCreateButton("Reboot", 50, 70, 153, 41) $Button2 = GUICtrlCreateButton("Delay", 300, 70, 137, 41) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _main() Case $Button1 Shutdown(6) Case $Button2 GUIDelete() _delay() EndSwitch WEnd EndFunc Func _delay() $r -= 1 Sleep(10000) _main() EndFunc What I need is a timeout on this box. Say if the user doesn't select Reboot or Delay within 30 seconds it will default to rebooting the device. Is this possible and if so how would I go about it? Thanks!
×
×
  • Create New...