manmoncang Posted May 6, 2006 Share Posted May 6, 2006 Hi all brilliant, i stuck with 2 things. 1. I need to random 4 number start 1111 - 9999. i use random(1111,9999,0) but result did not give me INTEGER number. Thus how i want only interger number start from 1111 - 9999. 2. How i want to read only 4 number at the middle of 8 number like this: i need read number only 3456 from 12345678 I know it's nut for u all but not for me. Tq for your help. i so appreciate it Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 6, 2006 Moderators Share Posted May 6, 2006 $Num = Random(1111, 9999, 1) MsgBox(0, 'Number', $Num) $String = 12345678 $Middle = StringTrimLeft(StringTrimRight($String, 2), 2) MsgBox(0, 'Middle', $Middle) 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. Link to comment Share on other sites More sharing options...
Valuater Posted May 6, 2006 Share Posted May 6, 2006 (edited) 1 use random(1111,9999,1) ; notice the "1" 2 $String = "12345678" $Result = StringTrimLeft($String, 2) $Final = StringLeft($Result, 4) MsgBox(64, "test", $Final) 8) getting slower everyday... lol Edited May 6, 2006 by Valuater Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 6, 2006 Moderators Share Posted May 6, 2006 (edited) getting slower everyday... lolComes with age Edit: Just thought I'd throw another in the mix:$String = Random(11111111, 99999999, 1) $Middle = StringMid($String, 3, 4) MsgBox(0, 'Middle', $String & @CR & $Middle) Edited May 6, 2006 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. Link to comment Share on other sites More sharing options...
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