ashley123 Posted March 25, 2009 Posted March 25, 2009 (edited) hello, im a new person from autohotkey and my code isnt working, what it does now is it takes only the last letter and upper/lower cases it a bunch of times but i want it to do the whole word. I'm trying to have it take in e.g. "cookies" and output "CoOKIeS" AUTOIT CODE: (I need help with this thanks ) $STRING_LENGTH = StringLen($USERNAME) For $i = $STRING_LENGTH to 0 Step -1 ;Loop,$STRING_LENGTH $CHAR = StringLeft($USERNAME,1) $RANDOM = Random(1,2,1) If $RANDOM = 1 Then $CHAR = StringLower($CHAR) Else $CHAR = StringUpper($CHAR) EndIf StringTrimLeft($CHAR,1) ;$char = StringTrimLeft($char,1) ;string=%string%%char% $USERNAME = $USERNAME&$char Next The code from an autohotkey example i was trying to duplicate is this: RANDOM: Gosub,CUT StringLen,length,string Loop,%length% { StringLeft,char,string,1 Random,random,1,2 If random=1 StringLower,char,char Else StringUpper,char,char StringTrimLeft,string,string,1 string=%string%%char% } If showstatus=1 ToolTip,Selection converted to RaNDoM CaSE SetTimer,TOOLTIPOFF,On Gosub,PASTE Return Edited March 25, 2009 by ashley123
ashley123 Posted March 25, 2009 Author Posted March 25, 2009 oops FIXED IT!! silly me. Plz delete topic. I accidentaly used a wrong variable name. Thanks for the help guys.
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