gerbilbunny Posted February 15, 2008 Share Posted February 15, 2008 Hi, I'm completely new to programming and have only made various small programs so far. What i was wondering was if someone could help me by giving me some guidance on an example for my next program. I want to create a program that selects a random word from a list in a .txt file or similar and then enters it into a box (set co-ordinates) and then hits enter. But i want this to happen at random intervals which can be set by the user. Thanks in advance. Link to comment Share on other sites More sharing options...
walle Posted February 15, 2008 Share Posted February 15, 2008 (edited) Take a look in the Help file. Random function ;Flip of coin If Random() < 0.5 Then ; Returns a value between 0 and 1. $msg = "Heads. 50% Win" Else $msg = "Tails. 50% Loss" Endif MsgBox(0,"Coin toss", $msg ) ;Roll of a die msgBox(0, "Roll of die", "You rolled a " & Random(1, 6, 1) )oÝ÷ ÙvƯj[~º&jËZÖ«uú+«b'â殶sbb33c·f"Òæ&VBgV÷C´3¢b3#µFV×b3#¶×fÆRæægV÷C²ÂgV÷C·6V7Föã"gV÷C²ÂgV÷C¶¶WgV÷C²ÂgV÷C´æ÷Df÷VæBgV÷C²¤×6t&÷CbÂgV÷Cµ&W7VÇBgV÷C²Âb33c·f" Edited February 15, 2008 by walle Link to comment Share on other sites More sharing options...
Paulie Posted February 15, 2008 Share Posted February 15, 2008 While 1 Dim $Wordlist[6] = ["Tom","Sam", "Joey", "Dave", "Mike", "Paul"] $i = Random(0,5,1) Msgbox(0,"",$Wordlist[$i]) WEnd Good luck! 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