random letters

Moderator: Moderator Group

random letters

Postby maarten » Sat Jul 13, 2013 10:48 am

Hey Guys,

I am trying to get some random letters on a screen.. so i made a patch witch generates random letters and send them to textbox.. but is it possible to get a textbox on a layer do i need to use a textinput and if so how to get random letters in there ?

hope you can help
maarten
 
Posts: 23
Joined: Fri Jun 14, 2013 3:26 pm
Location: Hoorn, The netherlands

Re: random letters

Postby alverman » Sat Jul 13, 2013 11:32 pm

Use a string var content "abcdef......" and read var with random value from 1 to var len.
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm

Re: random letters

Postby maarten » Mon Jul 22, 2013 12:24 pm

Hey Alverman,

Thanks for your reply, but to be honest I do not really understand what you mean, I hope you could explain me

grtz

Maarten
maarten
 
Posts: 23
Joined: Fri Jun 14, 2013 3:26 pm
Location: Hoorn, The netherlands

Re: random letters

Postby alverman » Tue Jul 23, 2013 1:26 am

Without much thinking about it I did so.
Definitely room for improvement but it works.

Hello, Alberto
You do not have the required permissions to view the files attached to this post.
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm

Re: random letters

Postby maarten » Sat Aug 24, 2013 1:18 pm

Hey Alverman,

Thanks for the reply, (it took me a while to find time to play with pandora some more )

and the patch works great!! do you by any chance also know a way to connect this to the collision panel ??

thanks
maarten
 
Posts: 23
Joined: Fri Jun 14, 2013 3:26 pm
Location: Hoorn, The netherlands

Re: random letters

Postby maarten » Sat Aug 24, 2013 2:45 pm

and is there a way to make the timing of the input random also random ??
maarten
 
Posts: 23
Joined: Fri Jun 14, 2013 3:26 pm
Location: Hoorn, The netherlands

Re: random letters

Postby alverman » Sat Aug 24, 2013 10:55 pm

Bah ..... try this if all goes well

Alberto
You do not have the required permissions to view the files attached to this post.
PROService -IT
Intel i7 2600K LGA1155
MB P8H67-MLE 16GB
2xSSD 250GB
GTX470
Win 8.1 PRO
Manager STD V6.1
Player PRO V6.1
WDPro V5 2500
** La famiglia ti nutre, ti veste .... finchè non sei pronto per girare il mondo alla ricerca di qualcosa di tuo. **
User avatar
alverman
 
Posts: 562
Joined: Sat Jun 12, 2010 6:37 pm

Re: random letters

Postby malkuth23 » Sun Aug 25, 2013 7:31 am

I did not actually download the code. Only looked at the screen capture...
But I think there might be a problem with your randomness.

Random generator should generate a number from 0-26
Rounding will sometimes output the number 0
Truncating will do the same thing.
But if you make the range 25, then truncate the random number, then add 1 - you should have the correct range.

Unless of course index 1 of an array is 0 and not 1... I really am not sure having not used arrays much.
Even if index 1 is actually 0, then there is still a problem with the randomness because this would mean that index 0 is half as likely to show up as all the others and 26 should not exist.
Please correct me if I am wrong.
Matthew Newman-Saul
Theatrical Concepts
mattns@theatrical.com
User avatar
malkuth23
 
Posts: 354
Joined: Tue Apr 20, 2010 7:14 pm
Location: New Orleans, LA

Re: random letters

Postby Dennis Kuypers » Mon Aug 26, 2013 9:11 pm

Hi,

when using random always use floor or ceil instead of round.

Best regards
Dennis
Dennis Kuypers
(former Product Developer, Software)
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: random letters

Postby maarten » Tue Aug 27, 2013 9:22 am

and is there a way to generate random values, and also generate random timing ??
maarten
 
Posts: 23
Joined: Fri Jun 14, 2013 3:26 pm
Location: Hoorn, The netherlands


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 17 guests