AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to omit space in StringSplit?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Eedis



Joined: 12 Jun 2009
Posts: 400

PostPosted: Sat Oct 17, 2009 9:48 pm    Post subject: How to omit space in StringSplit? Reply with quote

I'm not to sure how to omit spaces in String Split.
Code:
stringsplit, result_, codehere, `

I've also tried.
Code:
stringsplit, result_, codehere, `{space}

Both with no luck.

To help you out, codehere is the sentence "Type the code here..."

The first one only splits the first word of the sentence into letters and leaves out the rest of the sentence. It returns the result "T y p e" in a MsgBox.

The second one returns the first two letters of the first and second word as two seperate words. It returns the result "Ty th" in a MsgBox.

Any help would be great, thanks.

Code:
stringsplit, result_, codehere, ` {Space}
msgbox, %result_1% %result_2% %result_3% %result_4%

Is what I'm using to test the code. I want each result, each word. So that should work.
_________________
Pylons Are Trapped Balls.
http://www.autohotkey.net/~Eedis/
Back to top
View user's profile Send private message Visit poster's website
Eedis



Joined: 12 Jun 2009
Posts: 400

PostPosted: Sat Oct 17, 2009 9:53 pm    Post subject: Reply with quote

I got it, sorry.

Code:
stringsplit, result_, codehere, ` %A_Space%

_________________
Pylons Are Trapped Balls.
http://www.autohotkey.net/~Eedis/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group