dragonheard Posted April 16, 2012 Share Posted April 16, 2012 hi, so i wanna make a breezah talker (makes u talk like this bReEzAh) that changes ever letter because i made one that spams my capslock but it doesnt always do what i want.. so i want it to change every letter i type is this possible? and if so how? plz tell me and if possible post a sample script to make me understand better thanks a lot, dragonheurt Link to comment Share on other sites More sharing options...
Rutger83 Posted April 16, 2012 Share Posted April 16, 2012 (edited) Out of the top of my head, you could do something like this:Get the ASCII value of a char and then randomly get the char value of the ASCII char 32 places down (if the ASCII value os between 97 and 123http://www.autoitscript.com/autoit3/docs/appendix/ascii.htmAS you can see the lower casing letters have a value between 97 and 122, you use Asc() in the code the get this value of a letter. To make a lower casing upper casing you must find the upper casing ASCII value, you do this by subtracting 32 of the lower casing ASCII value, and then translate this numeric ASCII value back to a char by using Chr(). Also to get all the chars in string into an array which you can loop, you use StringSplit($string,"") with a blank detiminatorSomething like this should work$string="so i wanna make a breezah talker" $aStr=StringSplit($string,"") $string="" for $i=1 to $aStr[0] if random(1,2,1)=1 AND Asc($aStr[$i])>=97 AND Asc($aStr[$i])<123 then;randomly decided if you want to invert the casing $string&=Chr(Asc($aStr[$i])-32) Else $string&=$aStr[$i] endif next ConsoleWrite($string) Edited April 16, 2012 by Rutger83 Link to comment Share on other sites More sharing options...
notsure Posted April 19, 2012 Share Posted April 19, 2012 global $string = "so i wanna make a breezah talker" global $stringbreezah for $x = 0 to stringlen($string) step 2 $stringbreezah &= stringmid($string, ($x-1),1) & stringupper(stringmid($string,$x,1)) Next consolewrite($stringbreezah) 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