Jump to content

Digital Attitude Assistant


PsaltyDS
 Share

Recommended Posts

This is a repost from an old support thread, coded to emulate Klaatu's forum avitar:

; Digital Attitude Assistant
; Give_A_Damn.au3  --  v1.0

#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)

$hGUI = GUICreate("Give A Damn", 400, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit", $hGUI)
$hLabel = GUICtrlCreateLabel("Attempting to give a damn...", 10, 10, 380, 40, $SS_Center)
GUICtrlSetFont($hLabel, 14, 600)
$hProgress = GUICtrlCreateProgress(20, 60, 360, 50)
$hButton = GUICtrlCreateButton("Quit Trying", 160, 130, 80, 50)
GUICtrlSetOnEvent($hButton, "_Quit")

GUISetState(@SW_SHOW, $hGUI)

$Percent = 0
While 1
    GUICtrlSetData($hProgress, $Percent / 10)
    Sleep(20)
    $Percent += 1
    If $Percent = 900 Then
        GUICtrlSetData($hLabel, "Unable to give a damn. Quitting.")
        Sleep(2000)
        MsgBox(16, "Give A Damn", "Process failed!" & @CRLF & _
                "Damn not given.", 5)
        Exit
    EndIf
WEnd

Func _Quit()
    MsgBox(16, "Give A Damn", "User quit trying to give a damn...", 5)
    Exit
EndFunc   ;==>_Quit

Got a request for a link and wanted to make it easier to find...

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...