 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Leonidas225
Joined: 30 Jan 2009 Posts: 12
|
Posted: Fri Mar 27, 2009 1:22 pm Post subject: remove an element from a list |
|
|
list =
(
234586
213511
072441
124128
214199
)
how can i remove "072441" the new list should look like this:
234586
213511
124128
214199
i tried with
| Code: | | StringReplace, list, list,072441 , `r |
but it makes a hole into the list |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 27, 2009 1:27 pm Post subject: |
|
|
| Code: | Loop, Parse, list, `n
{
If InStr(A_LoopField, 072441)
Continue
Else
NewContent .= A_LoopField "`n"
}
MsgBox % NewContent |
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 27, 2009 1:29 pm Post subject: |
|
|
| Code: | | StringReplace, list, list,% 072441 "`n" , , |  |
|
| Back to top |
|
 |
hezlod Guest
|
Posted: Fri Mar 27, 2009 1:39 pm Post subject: Re: remove an element from a list |
|
|
| Leonidas225 wrote: | i tried with
| Code: | | StringReplace, list, list,072441 , `r |
but it makes a hole into the list |
You were very close. This is what you wanted.
| Code: | list =
(
234586
213511
072441
124128
214199
)
StringReplace, list, list,072441`n
msgbox, %list% |
|
|
| 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
|