Sign in to follow this  
Followers 0
nf67

Setting 2 controls to the same random value. Is this possible?

4 posts in this topic

#1 ·  Posted (edited)

Hi there,

I need two controls set to the same random thing. The first one is an edit box ( $Whattodo ) and the second is just a parameter( $Last ).

I want $Last to be a random value and then show that value in $Whattodo.

In order I to achieve this, I started with the following:

$LAST = Random(1,3,1)
GUICtrlSetData($Whattodo, Random(1,3,1)&@crlf, 1)

But it turned out that they were "seperate" randoms, not the same number.

How can I make them the same random number?

I also tried this, but it doesn't work:

GUICtrlSetData($Whattodo and $LAST, Random(1,3,1)&@crlf, 1)

Thanks a lot,

Chris

Edited by nf67

Share this post


Link to post
Share on other sites



Hi there,

I need two controls set to the same random thing. The first one is an edit box ( $Whattodo ) and the second is just a parameter( $Last ).

I want $Last to be a random value and then show that value in $Whattodo.

In order I to achieve this, I started with the following:

$LAST = Random(1,3,1)
GUICtrlSetData(Random(1,3,1)&@crlf, 1)

But it turned out that they were "seperate" randoms, not the same number.

How can I make them the same random number?

I also tried this, but it doesn't work:

GUICtrlSetData($Whattodo and $LAST, Random(1,3,1)&@crlf, 1)

Thanks a lot,

Chris

$LAST = Random(1,3,1)
GUICtrlSetData($Whattodo,$LAST)

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

Thanks :)

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  
Followers 0