Sign in to follow this  
Followers 0
GeekS

Send (Number)

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

Ur solution had some small leaks, but i know what u ment, thx :D

Share this post


Link to post
Share on other sites

Just missed one " ' " :D


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

Share this post


Link to post
Share on other sites

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 :D


Share this post


Link to post
Share on other sites

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()
EndFunc
This 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 :D

[center]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.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0