Jump to content

Recommended Posts

Posted (edited)

How can I make so when I push a button the script will chose 1 of 100 different texts and show one of them in notepad?

(I read the random thing in the manual, didnt understand it tho :) )

Edited by RandomGuest
Posted (edited)

An array is just a way to hold more information in an array.

dim $yourarray[10];10 is the number of "variabels" we want in our array , starting from zero
$yourarray[0]="one";you can now access this text by using $yourarray[0]
$yourarray[1]="two"
$yourarray[2]="three"
;So to get some random text:
msgbox(0,"",$yourarray[random(0,3)]);if random returns 0 the msgbox will say one, if 1 then it will say two if 2 it will say three
Edited by rambo3889
My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!
Posted (edited)

An array is just a way to hold more information in an array.

dim $yourarray[10];10 is the number of "variabels" we want in our array , starting from zero
$yourarray[0]="one";you can now access this text by using $yourarray[0]
$yourarray[1]="two"
$yourarray[2]="three"
;So to get some random text:
msgbox(0,"",$yourarray[random(0,3)]);if random returns 0 the msgbox will say one, if 1 then it will say two if 2 it will say three
How can I make so the text(one,two,three) shows in notepad and not in a messagebox?

Thanks btw :)

Edited by RandomGuest
  • Moderators
Posted (edited)

If it must display in an "open" window, look at ControlSetText() or ControlSend() to set/send the information.

If it's something you just want to open with the data showing, look at FileWrite()+ShellExecute().

P.S.

You've been here, a part of this forum for 6 months, that's more than enough time for knowing the basic questions as you have presented in this post. Show some effort next time, just saying you are "new" doesn't make you immune to reading and comprehending the help file, it's an insult to those of us that have spent a lot of our time to learn what it is that we need to know, to accomplish what we want to achieve.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
×
×
  • Create New...