Jump to content

100 Bottles of beer on the wall...


Recommended Posts

Well i added a little to your script wso you can restart try again etc etc

Hotkeyset("{F7}", "StartSong")
HotKeySet("{F8}", "PauseResumeSong")
HotKeySet("{F9}","ExitScript") ; New Hot Key
Global $inputA
Global $count = 1
Global $pause = True
Global $restart = False

MsgBox(0, "B.O.B.", "This is B.O.B." & @CRLF & "A script that will sing Bottles Of Beer")

StartSong()

While 1
    While $count > 0
        PauseCheck()
        If $restart Then $restart = False
        Send("Theres " & $count & " bottles of beer on the wall.{ENTER}")
        Sleep(2200)
        PauseCheck()
        If $restart Then ContinueLoop
        Send("" & $count & " bottles of beer{!}{!}{!} {ENTER}")
        Sleep(2200)
        PauseCheck()
        If $restart Then ContinueLoop
        Send("Take one down, pass it around.{ENTER}")
        Sleep(2200)
        If $restart Then ContinueLoop
        $count = $count - 1
    WEnd
    
    $result = MsgBox(36, "Try Again", "Wanna sing again?")
    If $result = 7 Then
        Exit
    Else
        StartSong()
    EndIf
WEnd

Func StartSong()
    $inputA=InputBox("B.O.B.", "How many Bottles of beer? (Press F8 to Start/Pause)")
    $count = $inputA
    $delay = True
    $restart = True
EndFunc

Func PauseResumeSong()
    $pause = NOT $pause
EndFunc

Func ExitScript()
    Exit ;Exits script
EndFunc

Func PauseCheck()
    while $pause
        sleep(100)
    WEnd
EndFunc

I use this page also http://www.autoitscript.com/autoit3/docs/ nice and quick :)

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

pretty sure the helpfile comes with the download, just check Start>All Programs>AutoIt3>Helpfile

are you callin me stupid or saying that people are to stupid to use the tray icon?

No, I'm saying some of my friends arn't smart.

You're very helpfull :) Sorry for the misunderstanding.

Link to comment
Share on other sites

  • 2 months later...

instead of 99 bottles of beer-i made this song!!!

99 vitims lined up on the wall!

99 victims to kill!

shoot one down!another one found!

98 victims left lined up on the wall!

repeat untill at 1...

1 more victim lined up on the wall!

1 more victim to kill!

shot him down!i was give a crown!

99 bodies all over the ground!

:shocked:

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...