Didtok » History » Version 6
Per Amundsen, 02/16/2023 12:13 PM
| 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 | 6 | Per Amundsen | table(ktable). |
| 10 | |*Parameter*|*Description*| |
||
| 11 | | <name> | Name of the dialog. | |
||
| 12 | | <id> | Id of the dialog control. | |
||
| 13 | | <c> | "ASCII":http://www.asciitable.com/ value to tokenize by. | |
||
| 14 | | <text> | Text to tokenize. | |
||
| 15 | 1 | Per Amundsen | |
| 16 | *Example* |
||
| 17 | |||
| 18 | <pre> |
||
| 19 | 5 | Per Amundsen | ; Dialog table layout. |
| 20 | 1 | Per Amundsen | dialog colors { |
| 21 | size -1 -1 100 200 |
||
| 22 | list 1, 10 10 80 180 |
||
| 23 | } |
||
| 24 | 2 | Per Amundsen | |
| 25 | 5 | Per Amundsen | ; Run the dialog. |
| 26 | 2 | Per Amundsen | /dialog -m colors colors |
| 27 | |||
| 28 | 5 | Per Amundsen | ; Tokenize the string "red blue orange yellow" by whitespace and insert result into the list control. |
| 29 | 2 | Per Amundsen | /didtok colors 1 32 red blue orange yellow |
| 30 | 1 | Per Amundsen | </pre> |