Jump to content
Sign in to follow this  
telmob

How do i get the string?

Recommended Posts

telmob

I have 10 strings like this:

$i1h

$i2h

(etc...)

I want to call these strings with random, but i can only get text and not the string itself.

$RandomString = $i&Random(1,10,1)&h
MsgBox(0, "Coin toss", $RandomString)
Edited by telmob

Share this post


Link to post
Share on other sites
michaelslamet

assign/put it on array :)

Share this post


Link to post
Share on other sites
michaelslamet

#include <Array.au3>

Local $aTest_Array[10] = ['AA', 'BB', 'CC', 'DD', 'EE', 'FF', 'GG', 'HH', 'II', 'JJ']

Msgbox(0,"Info",$aTest_Array[Random(1,10,1)-1])

  • Like 1

Share this post


Link to post
Share on other sites
telmob

Thanks man! ;)

Really nice and simple, love it.

Share this post


Link to post
Share on other sites
michaelslamet

Thanks man! ;)

Really nice and simple, love it.

Nice, glad can help :)

Share this post


Link to post
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
Sign in to follow this  

×