Skrip Posted March 5, 2006 Share Posted March 5, 2006 Can somebody make me a script so when i activate it, it will randomly send a letter. When I press esc it will turn off, thanks Please reply soon. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2006 Developers Share Posted March 5, 2006 Can somebody make me a script so when i activate it, it will randomly send a letter. When I press esc it will turn off, thanks Please reply soon.This is a joke right ?What about trying to do it yourself since it sounds pretty simple? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2006 Author Share Posted March 5, 2006 (edited) I know how to do a random send, but not with using letters. Other wise I would do it myself. Edited March 5, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
greenmachine Posted March 5, 2006 Share Posted March 5, 2006 Well how do you do your random send? That's a start. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2006 Developers Share Posted March 5, 2006 I know how to do a random send, but not with using letters. Other wise I would do it myself.Letters ascii values range from 65-90 for A-Z and 97-122 for a-z SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2006 Author Share Posted March 5, 2006 (edited) Well how do you do your random send? That's a start.Send(random) Func Random() Send(". " & Random(0, 99, 1) ) EndFunc Letters ascii values range from 65-90 for A-Z and 97-122 for a-z So how could I do that ^ with the code above? Edited March 5, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
cppman Posted March 5, 2006 Share Posted March 5, 2006 (edited) u could always make an array with the characters in it... and do something like send($Array[random(0, 50, 1)]) that will work... example: Dim $AlphaB[5] $AlphaB[0] = "a" $AlphaB[1] = "b" $AlphaB[2] = "c" $AlphaB[3] = "d" $AlphaB[4] = "e" Send($AlphaB[Random(0, 4, 1)]) ;or $Letter = Asc(random(67, 90, 1)); something like that Edited March 5, 2006 by CHRIS95219 Miva OS Project Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2006 Developers Share Posted March 5, 2006 Send(random) Func Random() Send(". " & Random(0, 99, 1) ) EndFunc So how could I do that ^ with the code above? Heres one way of doing it... by the way, you shouldn't give your Func that name of an existing internal function... Func SendRandom() Do $RandChar = Random(65, 122, 1) Until $RandChar < 91 Or $RandChar > 96 Send(". " & Chr($RandChar)) EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2006 Author Share Posted March 5, 2006 (edited) Post #7 Worked Post #8 (the one above) worked also GOOD JOB AND THAT YOU PEOLE! Edited March 5, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Lord_Doominik Posted March 5, 2006 Share Posted March 5, 2006 (edited) whats about: For $i = 1 To 100 Step 1 If Random() = 0 Then $letter = Random(65, 90) EndIf Else $letter = Random(97, 122) EndIf Send(Chr($letter)) Next Sends 100 letters... if you want it to be run until you press ESC take this: HotKeySet("{ESC}", "Exit1") While 1 If Random() = 0 Then $letter = Random(65, 90) EndIf Else $letter = Random(97, 122) EndIf Send(Chr($letter)) WEnd Func Exit1() Exit End Func Edited March 5, 2006 by Lord_Doominik Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2006 Author Share Posted March 5, 2006 That one seems to work very well also. Thank you everybody I got it working [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
CyberSlug Posted March 5, 2006 Share Posted March 5, 2006 Is the help file's example for Random Letter not clear enough? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2006 Author Share Posted March 5, 2006 I don't see anything in that, that says anything about letters [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
greenmachine Posted March 5, 2006 Share Posted March 5, 2006 Having trouble reading? ;Random letter If Random() < 0.5 Then ;Capitals $Letter = Chr(Random(Asc("A"), Asc("Z"), 1)) Else ;Lower case $Letter = Chr(Random(Asc("a"), Asc("z"), 1)) Endif Link to comment Share on other sites More sharing options...
Skrip Posted March 5, 2006 Author Share Posted March 5, 2006 Hmm, guess I missed that part. But anyway thanks to the people that helped. Now I won't fail Language arts. (Don't ask, it's for a project we are doing) [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
cppman Posted March 5, 2006 Share Posted March 5, 2006 lol. I've never seen that part of the random function either.... Miva OS Project Link to comment Share on other sites More sharing options...
CyberSlug Posted March 6, 2006 Share Posted March 6, 2006 Then maybe we should mention in the remarks section "To generate random numbers (or other characters), see the last example below" Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
greenmachine Posted March 6, 2006 Share Posted March 6, 2006 I think people see the long description of how it works, and don't bother reading through all the stuff. Although, since they ought to know that there are always code examples at the end, they should read through the whole code section... 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