hlstriker Posted May 2, 2007 Share Posted May 2, 2007 Hi, I was wondering if it's possible to break a string, and loop through each char of the string. Example: $string = "Hello" $stringCount = someCountString($string) $stringChars = someBreakString($string) for($i=0, $i<$stringCount, $i++) { send($stringChars[$i]) sleep(200) } The code above obviously won't work, but if it did it would break "Hello" into, "H" "e" "l" "l" "o", and send each letter one at a time with the 200 ms sleep. Any help on this would be great! The best Honda forums!RuneScape High Alching for Profit! Link to comment Share on other sites More sharing options...
xian7479 Posted May 2, 2007 Share Posted May 2, 2007 $string = "Hello" $stringCount = StringLen($string) For $i=1 To $stringCount send(StringMid($string, $i, 1)) sleep(200) Next Link to comment Share on other sites More sharing options...
hlstriker Posted May 2, 2007 Author Share Posted May 2, 2007 Thank you Works like a charm! The best Honda forums!RuneScape High Alching for Profit! Link to comment Share on other sites More sharing options...
xcal Posted May 2, 2007 Share Posted May 2, 2007 $split = StringSplit('HELLO', '') For $i = 1 To UBound($split) - 1 MsgBox(0, '', $split[$i]) Next How To Ask Questions The Smart Way 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