nf67 Posted October 3, 2008 Posted October 3, 2008 (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 October 3, 2008 by nf67
Valuater Posted October 3, 2008 Posted October 3, 2008 this should do it... $LAST = Random(1,3,1) GUICtrlSetData($Whattodo, $LAST & @CRLF, 1) ; checking MsgBox(0x0, "Last", $LAST) MsgBox(0x0, "Whattodo", $Whattodo) 8)
Monamo Posted October 3, 2008 Posted October 3, 2008 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]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now