Jump to content

putting a random number at the end of a link


 Share

Recommended Posts

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
Link to comment
Share on other sites

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))
    EndSelect
WEnd

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

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

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