Didtok » History » Version 4
Per Amundsen, 08/09/2015 05:45 AM
| 1 | 3 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | 1 | Per Amundsen | */didtok <name> <id> <c> <text>* |
| 4 | |||
| 5 | Tokenizes a string by character c, then adds the result to a dialog list/combo/edit box. |
||
| 6 | |||
| 7 | *Parameters* |
||
| 8 | |||
| 9 | <name> - Name of the dialog. |
||
| 10 | <id> - Id of the dialog control. |
||
| 11 | 4 | Per Amundsen | <c> - "ASCII":http://www.asciitable.com/ value to tokenize by. |
| 12 | 1 | Per Amundsen | <text> - Text to tokenize. |
| 13 | |||
| 14 | *Example* |
||
| 15 | |||
| 16 | <pre> |
||
| 17 | 2 | Per Amundsen | ;Dialog table layout. |
| 18 | 1 | Per Amundsen | dialog colors { |
| 19 | size -1 -1 100 200 |
||
| 20 | list 1, 10 10 80 180 |
||
| 21 | } |
||
| 22 | 2 | Per Amundsen | |
| 23 | ;Run the dialog. |
||
| 24 | /dialog -m colors colors |
||
| 25 | |||
| 26 | ;Tokenize the string "red blue orange yellow" by whitespace and insert result into the list control. |
||
| 27 | /didtok colors 1 32 red blue orange yellow |
||
| 28 | 1 | Per Amundsen | </pre> |