Jump to content

Search the Community

Showing results for tags '$GUI_EVENT_CLOSE'.

  • 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. Hi Guys, This is probably a simple question but im bumping my head against a wall currently. I have a script/app that I do not want a use to close by mistake when a certain Task is in progress. As such I created an Exit function and posed a question within the function that asks a user if they are sure they want to exit as the Task is still running. The problem I have is regardless on wether the user clicks on YES or NO the script still exits when it his the end of the function. Here is a sample of my code. $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") OnAutoItExitRegister("ExitDaApp") $CaptureStatus = True #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> Global $GuiMain = GUICreate("Test", 943, 523, 176, 129) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch If $CaptureStatus = True Then ReadLogs() EndIf Sleep(10) WEnd ;----------------------------------------------------------------------------- ;ExitDaApp - FUNCTION TO ;----------------------------------------------------------------------------- Func ExitDaApp() SplashOff() If $CaptureStatus = True Then If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(262420,"EXIT","Capture currently running, Are you sure you want to exit?") If $iMsgBoxAnswer = "6" Then Exit Else Return EndIf Else Exit EndIf EndFunc ;===> ExitDaApp ;----------------------------------------------------------------------------- ;ReadLogs - FUNCTION TO ;----------------------------------------------------------------------------- Func ReadLogs() ;just read through soem log files. EndFunc ;===> ReadLogs
×
×
  • Create New...