 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
damajha
Joined: 23 Oct 2006 Posts: 31
|
Posted: Mon Jan 14, 2008 8:05 pm Post subject: Loop, StringSplit, MsgBox Problem |
|
|
OK, another one of my "I'm missing the obvious"
All I want to do is split up a list of names, and output the current name and the next name on the list. If I reach the last name I want to output the 1st name.
I am getting an "illegal character" error at Line 8 (MsgBox)?
| Code: |
Names = Joe Bob Hank Brian Elliot
StringSplit, List, Names, %A_Space%
Loop, %List0%
{
next := A_Index + 1
If (next > List0)
next = 1
MsgBox, % List%A_Index% `n % List%next%
}
|
Thanks |
|
| Back to top |
|
 |
TheIrishThug
Joined: 19 Mar 2006 Posts: 370
|
Posted: Mon Jan 14, 2008 8:33 pm Post subject: |
|
|
| If you are doing MsgBox as an expression, the `n must be quoted as a string. |
|
| Back to top |
|
 |
damajha
Joined: 23 Oct 2006 Posts: 31
|
Posted: Mon Jan 14, 2008 8:45 pm Post subject: |
|
|
| Thank you!! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|