Arez Posted March 24, 2006 Share Posted March 24, 2006 Checked and couldn't really find anything. How would I make it send something random, and specify how many chars it uses? Thanks Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 24, 2006 Moderators Share Posted March 24, 2006 (edited) Checked and couldn't really find anything. How would I make it send something random, and specify how many chars it uses? ThanksWow... 1. Send what random? 2. Try to give an example if your not going to post any code, and your asking a specific question like this. Here, this should give you an idea at least (of what I think you mean)Send(SendRandomText(5)) Func SendRandomText($i_NumChars) Local $GatherInfo = '' For $x = 1 To $i_NumChars $GatherInfo = $GatherInfo & Chr(Random(65, 90)) Next Return $GatherInfo EndFunc Edited March 24, 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...
Nuffilein805 Posted March 24, 2006 Share Posted March 24, 2006 (edited) how about Send(SendRandomText(5, 2)) Func SendRandomText($i_NumChars, $i_chars = 0) Local $GatherInfo = '' select case $i_chars = 0 For $x = 1 To $i_NumChars $GatherInfo = $GatherInfo & Chr(Random(65, 90)) Next case $i_chars = 1 For $x = 1 To $i_NumChars $GatherInfo = $GatherInfo & Chr(Random(97, 122)) Next case $i_chars = 2 For $x = 1 To $i_NumChars $rdm = random (0, 1, 1) if $rdm = 0 then $GatherInfo = $GatherInfo & Chr(Random(65, 90)) if $rdm = 1 then $GatherInfo = $GatherInfo & Chr(Random(97, 122)) Next endselect Return $GatherInfo EndFunc sorry smoke to mess up your script but i felt like i had to use uppercase & lowercase letters Edited March 24, 2006 by Nuffilein805 my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 24, 2006 Moderators Share Posted March 24, 2006 (edited) sorry smoke to mess up your script but i felt like i had to use uppercase & lowercase letters No worries , but maybe:Send(SendRandomText(5)) Func SendRandomText($i_NumChars) Local $GatherInfo = '' For $x = 1 To $i_NumChars If Random(1, 2, 1) == 1 Then $GatherInfo = $GatherInfo & Chr(Random(65, 90, 1)) Else $GatherInfo = $GatherInfo & StringLower(Chr(Random(65, 90, 1))) EndIf Next Return $GatherInfo EndFunc? Edit: Or even:Send(SendRandomText(5)) Func SendRandomText($i_NumChars) Local $GatherInfo = '' For $x = 1 To $i_NumChars If Random(1, 2, 1) == 1 Then $GatherInfo = $GatherInfo & Chr(Random(65, 90, 1)) Else $GatherInfo = $GatherInfo & Chr(Random(97, 122, 1)) EndIf Next Return $GatherInfo EndFunc Edit2 Or even with numbers and letters:Send(SendRandomText(5)) Func SendRandomText($i_NumChars) Local $GatherInfo = '' For $x = 1 To $i_NumChars $RanNum = Random(1, 3, 1) If $RanNum == 1 Then $GatherInfo = $GatherInfo & Chr(Random(65, 90, 1)) ElseIf $RanNum == 2 Then $GatherInfo = $GatherInfo & Chr(Random(97, 122, 1)) Else $GatherInfo = $GatherInfo & Random(0, 9, 1) EndIf Next Return $GatherInfo EndFunc Edited March 24, 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...
Nuffilein805 Posted March 24, 2006 Share Posted March 24, 2006 No worries , but maybe:Send(SendRandomText(5)) Func SendRandomText($i_NumChars) Local $GatherInfo = '' For $x = 1 To $i_NumChars If Random(1, 2, 1) == 1 Then $GatherInfo = $GatherInfo & Chr(Random(65, 90, 1)) Else $GatherInfo = $GatherInfo & StringLower(Chr(Random(65, 90, 1))) EndIf Next Return $GatherInfo EndFunc?nice 1 as well but i wanted to give the opportunity to choose if uppercase or lowercase or both my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 24, 2006 Moderators Share Posted March 24, 2006 nice 1 as well but i wanted to give the opportunity to choose if uppercase or lowercase or bothAhh, I see... either or, nice choices if we are right on the assumption. 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...
Nuffilein805 Posted March 24, 2006 Share Posted March 24, 2006 IF we are right, somehow the question was not too clear my little chatmy little encryption toolmy little hidermy unsafe clickbot 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