GeekS Posted June 7, 2006 Share Posted June 7, 2006 Having problems doing a fun script here, you can see it here; ;;;;; Func BEER() $s = 99 $i = 100 While $i >= 1 Send ( '$i bottles of beer on the wall, $i bottles of beer, you take 1 down, pass it around, $s bottles of beer on the wall'.) $s = $s - 1 $i = $i - 1 WEnd EndFunc ;;;;;; Now my problem is that the send command doesnt allow the $'s to use numbers, but just types etc $s. Is there any way i can fix this? Greetz & Thanks from GeekS Link to comment Share on other sites More sharing options...
Daniel W. Posted June 7, 2006 Share Posted June 7, 2006 Func BEER() $s = 99 $i = 100 While $i >= 1 Send ( $i & ' bottles of beer on the wall, & $i & ' bottles of beer, you take 1 down, pass it around,' & $s & ' bottles of beer on the wall'.) $s = $s - 1 $i = $i - 1 WEnd EndFunc --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Link to comment Share on other sites More sharing options...
GeekS Posted June 7, 2006 Author Share Posted June 7, 2006 Ur solution had some small leaks, but i know what u ment, thx Link to comment Share on other sites More sharing options...
Daniel W. Posted June 7, 2006 Share Posted June 7, 2006 Just missed one " ' " --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote] Link to comment Share on other sites More sharing options...
Nomad Posted June 7, 2006 Share Posted June 7, 2006 Better yet: Func BEER() $s = 99 $i = 100 While $i >= 1 Send ( $i & ' bottles of beer on the wall,' & $i & ' bottles of beer, you take 1 down, pass it around,' & $s & ' bottles of beer on the wall.') $s -= 1 $i -= 1 WEnd EndFunc Nomad Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 7, 2006 Moderators Share Posted June 7, 2006 Func BEER() Local $i_BottlesLeft = 100 For $i_BottleCount = 100 To 1 Step - 1 Local $sBC = 's', $sBL = 's' $i_BottlesLeft -= 1 If $i_BottleCount < 2 Then $sBC = '' If $i_BottlesLeft = 1 Then $sBL = '' ConsoleWrite($i_BottleCount & ' bottle' & $sBC & ' of beer on the wall, ' & $i_BottleCount _ & ' bottle' & $sBC & ' of beer, you take 1 down, pass it around, ' & $i_BottlesLeft _ & ' bottle' & $sBL & ' of beer on the wall.' & @LF) Next If MsgBox(36, 'Repeat?', 'Would you like to start over?') = 6 Then BEER() EndFuncThis reminded me of the kids singing this on a long trip, and always starting over... would be funny to get the text to voice synthesizer going on this one, that way I could annoy them like they do me on the trips Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now