Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Randomize output


  • Please log in to reply
6 replies to this topic
SilverFish
  • Members
  • 163 posts
  • Last active: May 16 2015 01:21 PM
  • Joined: 06 Dec 2010
I've seen this way, but can't find it in the forums.

Basically, you have a list like:

text = random text here

text2 = random text here

text3 = random text here

And then a line that will randomly pick from text, text2 or text3.

Does this make sense?

Thanks!

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
<!-- m -->http://www.autohotke...topic67348.html<!-- m -->

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
text=

(

this is the first line of random text 

this is the second line of random text

this is the third line of random text

this is the fourth line of random text

this is the fifth line of random text

this is the sixth line of random text

this is the seventh line of random text

this is the eighth line of random text

this is the ninth line of random text

this is the tenth line of random text

)



F7::

Sort, text, Random

; MsgBox %	text

Loop, parse, text, `n

{

	MsgBox % A_LoopField

	break

}

return


SilverFish
  • Members
  • 163 posts
  • Last active: May 16 2015 01:21 PM
  • Joined: 06 Dec 2010
Very close. It is working as it should, but I noticed a little tweaking that should happen.

Here's an example of what I have:
text = Random text.`n`nThanks,`nBubba

I know what to do, but don't seem to know how to do it. :/