Jump to content

self extracting images?


 Share

Recommended Posts

FileInstall

Thanks!

also would you be able to help me with this piece of code.. it's pretty self explaining.

Const $var = Random(1, 3)

While 1 


Select
    Case $var = 1
        MsgBox(0, "", "1")
    Case $var = 2
        MsgBox(0, "", "2")
    Case $var = 3
        MsgBox(0, "", "3")
    Case Else
        MsgBox(0, "", "No preceding case was true!")
    EndSelect
    
    WEnd
Link to comment
Share on other sites

Change

Const $var = Random(1, 3)oÝ÷ Ù:ºÚ"µÍÛÛÝ   ÌÍÝH[ÛJKËJ

If you don't set the last parameter in Random to 1, it returns a decimal, otherwise it returns an integer. ex: 1.2 = 1 would evaluate to false

thanks for that... today just isn't my day i can't seem to solve even the simplest problems... i have one more question.. i

i want it to be an ongoing loop.. so it continually generates a new random number.. so i need to set $var back to null

Const $var = Random(1, 3, 1)


While 1 

Select
    Case $var = 1
        MsgBox(0, "", "1")
    Case $var = 2
        MsgBox(0, "", "2")
    Case $var = 3
        MsgBox(0, "", "3")
    Case Else
        MsgBox(0, "", "No preceding case was true!")
    EndSelect
    
    WEnd

thats what i have.. so now it need to be something like.....

Const $var = Random(1, 3, 1)


While 1 
       $var = ""
Select
    Case $var = 1
        MsgBox(0, "", "1")
    Case $var = 2
        MsgBox(0, "", "2")
    Case $var = 3
        MsgBox(0, "", "3")
    Case Else
        MsgBox(0, "", "No preceding case was true!")
    EndSelect
    
    WEnd

any ideas?

Link to comment
Share on other sites

thanks for that... today just isn't my day i can't seem to solve even the simplest problems... i have one more question.. i

i want it to be an ongoing loop.. so it continually generates a new random number.. so i need to set $var back to null

Const $var = Random(1, 3, 1)


While 1 

Select
    Case $var = 1
        MsgBox(0, "", "1")
    Case $var = 2
        MsgBox(0, "", "2")
    Case $var = 3
        MsgBox(0, "", "3")
    Case Else
        MsgBox(0, "", "No preceding case was true!")
    EndSelect
    
    WEnd

thats what i have.. so now it need to be something like.....

Const $var = Random(1, 3, 1)


While 1 
       $var = ""
Select
    Case $var = 1
        MsgBox(0, "", "1")
    Case $var = 2
        MsgBox(0, "", "2")
    Case $var = 3
        MsgBox(0, "", "3")
    Case Else
        MsgBox(0, "", "No preceding case was true!")
    EndSelect
    
    WEnd

any ideas?

You can't define the $var as a const if it's supposed to change..

And you need to put the Random() function inside the while loop, obviously..

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