Jump to content
Sign in to follow this  
houseonfire

putting a random number at the end of a link

Recommended Posts

houseonfire

I need to generate a random number between 1, and 4305 at the end of a link.

I know the Random (1, 4035) command. But how to I put that at the end of the link?

$number = random (1, 4305)
$url= ("www.link.com/number=")

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $bigredbutton
            MSGBox(0, "GO" , "GO!")
            _IECreate ($url)
    EndSelect
Wend
Edited by houseonfire

Share this post


Link to post
Share on other sites
houseonfire

You are JESUS.

Thank you Soo much.

Share this post


Link to post
Share on other sites
Paulie

mehh you prolly want to change it to

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $bigredbutton
            MsgBox(0, "GO", "GO!")
            _IECreate("www.link.com/number=" & Random(1, 4305,1))
    EndSelect
WEnd

Because otherwise, i think you get a really long decimal....

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  

×