tutorial.html 118 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv='content-type' content='text/html; charset=utf-8'>
  5. <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  6. <style type='text/css'>
  7. body {font-family:Consolas;font-size:12pt}
  8. a {text-decoration:none}
  9. a:link {color:#06b}
  10. a:visited {color:#6b0}
  11. a:hover {text-decoration:underline}
  12. a:active {color:#b06}
  13. </style>
  14. <body bgcolor='#000000'>
  15. </head>
  16. <pre>
  17. <span style='background-color:#000'><span style='color:#FFF'>
  18. <a href='#INDEX'>INDEX </a> <a href='#EDITING'>EDITING </a> <a href='#MAPPING'>MAPPING </a> <a href='#MSLP'>MSLP </a> <a href='#SPEEDWALK'>SPEEDWALK </a>
  19. <a href='#INTRODUCTION'>INTRODUCTION </a> <a href='#ESCAPE CODES'>ESCAPE CODES </a> <a href='#MATHEMATICS'>MATHEMATICS </a> <a href='#PCRE'>PCRE </a> <a href='#STATEMENTS'>STATEMENTS </a>
  20. <a href='#CHARACTERS'>CHARACTERS </a> <a href='#GREETING'>GREETING </a> <a href='#METRIC SYSTEM'>METRIC SYSTEM </a> <a href='#REPEAT'>REPEAT </a> <a href='#SUBSTITUTIONS'>SUBSTITUTIONS </a>
  21. <a href='#COLORS'>COLORS </a> <a href='#KEYPAD'>KEYPAD </a> <a href='#MOUSE'>MOUSE </a> <a href='#SCREEN READER'>SCREEN READER </a> <a href='#SUSPEND'>SUSPEND </a>
  22. <a href='#COORDINATES'>COORDINATES </a> <a href='#LISTS'>LISTS </a> <a href='#MSDP'>MSDP </a> <a href='#SESSIONNAME'>SESSIONNAME </a> <a href='#TIME'>TIME </a>
  23. <a name='INDEX'></a>
  24. </span><span style='color:#FF5'> INDEX
  25. </span><span style='color:#08F'> ████████┐██████┐███┐ ██┐████████┐██████┐███┐ ██┐
  26. └──██┌──┘└─██┌─┘████┐ ██│└──██┌──┘└─██┌─┘████┐ ██│
  27. ██│ ██│ ██┌██┐ ██│ ██│ ██│ ██┌██┐ ██│
  28. ██│ ██│ ██│└██┐██│ ██│ ██│ ██│└██┐██│
  29. ██│ ██████┐██│ └████│ ██│ ██████┐██│ └████│
  30. └─┘ └─────┘└─┘ └───┘ └─┘ └─────┘└─┘ └───┘
  31. ██┐ ██┐
  32. ██│ ██│
  33. ████████┐████████┐
  34. └──██┌──┘└──██┌──┘
  35. ██│ ██│
  36. └─┘ └─┘
  37. (</span><span style='color:#06B'>T</span><span style='color:#08F'>)</span><span style='color:#06B'>he K</span><span style='color:#08F'>(</span><span style='color:#06B'>I</span><span style='color:#08F'>)</span><span style='color:#06B'>cki</span><span style='color:#08F'>(</span><span style='color:#06B'>N</span><span style='color:#08F'>)</span><span style='color:#06B'> </span><span style='color:#08F'>(</span><span style='color:#06B'>T)ickin D</span><span style='color:#08F'>(</span><span style='color:#06B'>I</span><span style='color:#08F'>)</span><span style='color:#06B'>kumud Clie</span><span style='color:#08F'>(</span><span style='color:#06B'>N</span><span style='color:#08F'>)</span><span style='color:#06B'>t
  38. </span><span style='color:#5F5'> What is TinTin++?
  39. </span><span style='color:#AAA'>
  40. TinTin++ is a client program specialized to help playing muds. This is
  41. a souped up version of TINTIN III with many new features.
  42. </span><span style='color:#5F5'> Giving Credit Where Credit is Due
  43. </span><span style='color:#AAA'>
  44. None of this work would be possible, without the work done by Peter
  45. Unold. He was the author of TINTIN III, the base of TinTin++. Hats off
  46. to ya Peter. You started the ball rolling.
  47. </span><span style='color:#5F5'> Introduction
  48. </span><span style='color:#AAA'>
  49. If you're new to TinTin++ a good place to start is the introduction,
  50. which should be linked below.
  51. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#INTRODUCTION'>introduction</a>
  52. <a name='INTRODUCTION'></a>
  53. </span><span style='color:#FF5'> INTRODUCTION
  54. </span><span style='color:#AAA'> On this page you'll find an introduction to using TinTin++. Additional
  55. information can be found in the individual help sections.
  56. </span><span style='color:#5F5'>
  57. Starting and Ending
  58. </span><span style='color:#AAA'>
  59. The syntax for starting TinTin++ is: ./tt++ [command file]
  60. Read more about the command file in the files section below. Remember
  61. one thing though. All actions, aliases, substitutions, etc, defined
  62. when starting up TinTin++ are inherited by all sessions.
  63. If you want to exit TinTin++ type '#end' or press ctrl-d on an empty
  64. line.
  65. For the WinTin++ users, if you want to paste text use shift-insert,
  66. text is automatically copied upon selection. This is typical Linux
  67. behavior, but it can take some getting used to.
  68. </span><span style='color:#5F5'>
  69. Basic features
  70. </span><span style='color:#AAA'>
  71. I'll start by explaining some of the very basic and important features:
  72. All TinTin++ commands starts with a '#'.
  73. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #help -- #help is a client command, and isn't send to the server.
  74. All TinTin++ commands can be abbreviated when typed.
  75. #he -- Typing #he is the same as typing #help though it's suggested to
  76. use at least 3 letter abbreviations just in case another command is
  77. added that starts with 'he'.
  78. All commands can be separated with a ';'.
  79. n;l dragon;s;say Dan Dare is back! -- do these 4 commands
  80. There are 3 ways ';'s can be overruled.
  81. &bsol;say Hello ;) -- Lines starting with a '&bsol;' aren't parsed by TinTin++.
  82. say Hello &bsol;;) -- The escape character can escape 1 letter.
  83. #config verbatim on -- Everything is sent as is except '#' commands.
  84. </span><span style='color:#5F5'>
  85. Connecting to a server
  86. </span><span style='color:#FFF'>
  87. Command</span><span style='color:#AAA'>: #session </span><span style='color:#FFF'>{</span><span style='color:#AAA'>session name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>server address</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>port</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  88. Example: #session someone tintin.sourceforge.net 4321
  89. You can have more than one session, in which case you can switch
  90. between sessions typing #&lt;session name&gt;.
  91. You can get a list of all sessions by typing: #session. The current
  92. active session is marked with (active). Snooped sessions with
  93. (snooped). MCCP sessions (compression) with (mccp 2) and (mccp 3).
  94. </span><span style='color:#5F5'>
  95. Split
  96. </span><span style='color:#FFF'>
  97. Command</span><span style='color:#AAA'>: #split
  98. The split command will create a separated input and output area.
  99. Using the #prompt command you can capture the prompt and place it on
  100. the split line. To get rid of the split interface you can use #unsplit
  101. which will restore the terminal settings to default.
  102. </span><span style='color:#5F5'>
  103. Alias
  104. </span><span style='color:#FFF'>
  105. Command</span><span style='color:#AAA'>: #alias </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  106. The syntax of the #alias command is almost like alias in csh.
  107. Use this command to define aliases. The variables %0, %1.. %9 contain
  108. the arguments to the aliased command as follows:
  109. the %0 variable contains all the arguments.
  110. the %1 variable contains the 1st argument
  111. ....
  112. the %9 variable contains the 9th argument
  113. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias greet say Greetings, most honorable %1
  114. If you want an alias to execute more commands, you must use braces.
  115. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias ws </span><span style='color:#FFF'>{</span><span style='color:#AAA'>wake;stand</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  116. To delete an alias use the #unalias command.
  117. WARNING! TinTin++ doesn't baby sit, and hence does not check for
  118. recursive aliases! You can avoid recursion by escaping the entire
  119. line.
  120. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias put &bsol;put %1 in %2
  121. Or by using the send command.
  122. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias put #send put %1 in %2
  123. </span><span style='color:#5F5'> Action
  124. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>action-text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  125. Use this command to define an action to take place when a particular
  126. text appears on your screen. There are 99 variables you can use as
  127. wildcards in the action-text.
  128. These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99.
  129. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>You are hungry</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>get bread bag;eat bread</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  130. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%1 has arrived.</span><span style='color:#FFF'>}</span><span style='color:#AAA'> shake %1 -- shake hands with people arriving.
  131. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%1 tells you '%2'</span><span style='color:#FFF'>}
  132. {</span><span style='color:#AAA'>tell bob %1 told me '%2'</span><span style='color:#FFF'>}</span><span style='color:#AAA'> -- forward tells.
  133. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tells you</span><span style='color:#FFF'>}</span><span style='color:#AAA'> #bell -- beep on tell.
  134. You can have TinTin++ ignore actions if you type '#ignore actions on'.
  135. You can see what commands TinTin++ executes when an action triggers
  136. by typing '#debug actions on'.
  137. You can remove actions with the #unaction command.
  138. </span><span style='color:#5F5'>
  139. Command files
  140. </span><span style='color:#AAA'>
  141. When you order TinTin++ to read a command file, it parses all the text
  142. in the file. You can use command files to keep aliases/actions in,
  143. login to a server (name, password etc..) and basically all kinds of
  144. commands.
  145. You can make the command files with either a text editor (suggested),
  146. or use the #write command to write out a file.
  147. Commands for files:
  148. #read filename -- read and execute the file.
  149. #write filename -- write all actions/aliases/substitutes/etc known for
  150. the current session to a file.
  151. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>:
  152. #session x mymud.com 1234
  153. myname
  154. mypassword
  155. #split
  156. #action {^You are hungry.} {eat bread}
  157. If you save the above five lines to a file named 'mymud.tin' you can
  158. use 'tt++ mymud.tin' to start tintin and execute the file, connecting
  159. you to your mud, logging in, enabling split mode, and setting an action
  160. to eat a bread whenever you go hungry.
  161. </span><span style='color:#5F5'>
  162. Highlight
  163. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #highlight </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>color</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  164. This command works a bit like #action. The purpose of this command is
  165. to substitute text from the server with color you provide. This command
  166. is a simplified version of the #substitute command.
  167. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high </span><span style='color:#FFF'>{</span><span style='color:#AAA'>Snowy</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>light yellow</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  168. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%*Snowy%*</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>light yellow</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  169. Use #unhigh to delete highlights.
  170. </span><span style='color:#5F5'> Speedwalk
  171. </span><span style='color:#AAA'>
  172. If you type a command consisting ONLY of letters and numbers n, e, s,
  173. w, u, d - then this command can be interpreted as a serie of movement
  174. commands.
  175. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: ssw2n -- go south, south, west, north, north
  176. If you have problems with typing some commands that actually ONLY
  177. consists of these letters, then type them in CAPS. For example when
  178. checking the NEWS or when asked to enter NEW as your name.
  179. You must enable speedwalking with: #config speedwalk on.
  180. </span><span style='color:#5F5'>
  181. Ticker
  182. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #ticker </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>seconds</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  183. The name can be whatever you want it to be, and is only required for
  184. the unticker command. The commands will be executed every x amount of
  185. seconds, which is specified in the interval part.
  186. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #tick </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tick</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>60</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  187. This creates a ticker with the name </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tick</span><span style='color:#FFF'>}</span><span style='color:#AAA'> which will print TICK!!!,
  188. as well as print a warning when the next tick will occure.
  189. You can remove tickers with #untick
  190. </span><span style='color:#5F5'>
  191. Repeating Commands
  192. </span><span style='color:#AAA'>
  193. You can repeat a command, the syntax is: #number command
  194. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #5 cackle -- if you just killed bob the wizard.
  195. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #10 </span><span style='color:#FFF'>{</span><span style='color:#AAA'>buy bread;put bread bag</span><span style='color:#FFF'>}</span><span style='color:#AAA'> -- repeat these 2 commands 10 times.
  196. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #100 ooc w00t w00t!!!!! -- nochannel yourself.
  197. </span><span style='color:#5F5'>
  198. History
  199. </span><span style='color:#AAA'>
  200. TinTin++ has a limited subset of the csh history features.
  201. ! -- repeat the last command
  202. !cast -- repeat the last command starting with cast
  203. ctrl-r -- enter the reverse history search mode.
  204. </span><span style='color:#5F5'>
  205. Map commands
  206. </span><span style='color:#AAA'>
  207. TinTin++ has a powerful highly configurable automapper. Whenever
  208. you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your
  209. movement.
  210. Commands for map:
  211. #map create -- create a map.
  212. #map goto 1 -- go to the first room in the map, created by default.
  213. #map map -- display the map.
  214. #map undo -- undo your last map alteration.
  215. #map write &lt;filename&gt; -- save the map to file.
  216. #map read &lt;filename&gt; -- load a map from file.
  217. There are many other map options and it's beyond the scope of this
  218. help section to explain everything there is to know, but I'll give
  219. a set of commands that will get most people started.
  220. #map create
  221. #split 12 1
  222. #map flag unicode on
  223. #map flag vt on
  224. #map goto 1
  225. These commands will create a 12 row vt100 split section at the top of
  226. your screen where a map drawn using unicode characters is displayed.
  227. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>There is no exit in that direction.</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>#map undo</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  228. The map will be automatically created as you move around.
  229. </span><span style='color:#5F5'>
  230. Help
  231. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #help </span><span style='color:#FFF'>{</span><span style='color:#AAA'>subject</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  232. The help command is your friend and contains the same helpfiles
  233. inside TinTin++ as are available on the website. If you type #help
  234. without an argument you will see the various available help subjects
  235. which try to explain the TinTin++ commands and features in greater
  236. detail. Entries in cyan describe commands, while entries in white
  237. describe various features, often in greater detail.
  238. </span><span style='color:#5F5'>
  239. That's all for the introduction, enjoy</span><span style='color:#AAA'>
  240. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#EDITING'>editing</a>, <a href='#ESCAPE_CODES'>escape_codes</a>, <a href='#GREETING'>greeting</a>, <a href='#KEYPAD'>keypad</a>, <a href='#LISTS'>lists</a>, <a href='#MAPPING'>mapping</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#SCREEN_READER'>screen_reader</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SPEEDWALK'>speedwalk</a>, <a href='#STATEMENTS'>statements</a>, <a href='#SUSPEND'>suspend</a> and <a href='#TIME'>time</a>.
  241. <a name='CHARACTERS'></a>
  242. </span><span style='color:#FF5'> CHARACTERS
  243. </span><span style='color:#AAA'>
  244. The following special characters are defined:
  245. # The hashtag is the default character for starting a command and is
  246. subsequently known as the command character or tintin character.
  247. When loading a command file the command character is set to the
  248. first character in the file. The character can also be redefined
  249. using #config.
  250. ; The semi-colon is used as the command separator and can be used to
  251. separate two commands. Multiple commands can be strung together as
  252. well. Trailing semi-colons are ignored when reading a script file
  253. as this is a common error.
  254. { } Curly brackets aka braces are used for separating multi word command
  255. arguments, nesting commands, and nesting variables. Braces cannot
  256. easily be escaped and must always be used in pairs.
  257. &quot; &quot; Quote characters are used for strings in the #math, #if, #switch,
  258. and #case commands. It is however suggested to use a set of braces
  259. { } to define strings instead, particularly when checking strings
  260. that may contain quotes.
  261. ! The exclamation sign is used to repeat commands, see #help history.
  262. The character can be redefined using #config.
  263. &bsol; An input line starting with a backslash is sent verbatim if you are
  264. connected to a server. This character can be configured with
  265. #config, and is itself sent verbatim when the verbatim config mode
  266. is enabled.
  267. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COLORS'>colors</a>, <a href='#ESCAPE'>escape</a>, <a href='#FUNCTION'>function</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#PCRE'>pcre</a> and <a href='#VARIABLE'>variable</a>.
  268. <a name='COLORS'></a>
  269. </span><span style='color:#FF5'> COLORS
  270. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: &lt;xyz&gt; with x, y, z being parameters
  271. Parameter 'x': VT100 code
  272. 0 - Reset all colors and codes to default
  273. 1 - Bold
  274. 2 - Dim
  275. 3 - Italic
  276. 4 - Underscore
  277. 5 - Blink
  278. 7 - Reverse
  279. 8 - Skip (use previous code)
  280. Parameter 'y': Foreground color
  281. Parameter 'z': Background color
  282. 0 - Black 5 - Magenta
  283. 1 - Red 6 - Cyan
  284. 2 - Green 7 - White
  285. 3 - Yellow 8 - Skip
  286. 4 - Blue 9 - Default
  287. For xterm 256 colors support use &lt;aaa&gt; to &lt;fff&gt; for RGB foreground
  288. colors and &lt;AAA&gt; to &lt;FFF&gt; for RGB background colors. For the grayscale
  289. foreground colors use &lt;g00&gt; to &lt;g23&gt;, for grayscale background colors
  290. use &lt;G00&gt; to &lt;G23&gt;.
  291. The tertiary colors are as follows:
  292. &lt;acf&gt; - Azure &lt;afc&gt; - Jade
  293. &lt;caf&gt; - Violet &lt;cfa&gt; - Lime
  294. &lt;fac&gt; - Pink &lt;fca&gt; - Orange
  295. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show &lt;acf&gt;Azure &lt;afc&gt;Jade &lt;caf&gt;Violet
  296. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show &lt;cfa&gt;Lime &lt;fac&gt;Pink &lt;fca&gt;Orange
  297. For 12 bit truecolor use &lt;F000&gt; to &lt;FFFF&gt; for foreground colors and
  298. &lt;B000&gt; to &lt;BFFF&gt; for background colors.
  299. For 24 bit truecolor use &lt;F000000&gt; to &lt;FFFFFFF&gt; for foreground
  300. colors and &lt;B000000&gt; to &lt;BFFFFFF&gt; for background colors.
  301. If the color code exceeds your configured color mode it will be
  302. downgraded to the closest match.
  303. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  304. <a name='COORDINATES'></a>
  305. </span><span style='color:#FF5'> COORDINATES
  306. </span><span style='color:#AAA'>
  307. When the 0,0 coordinate is in the upper left corner TinTin++ uses
  308. a y,x / row,col notation, starting at 1,1. Subsequently -1,-1
  309. will indicate the bottom right corner. This type of argument is
  310. used by the #showme command.
  311. When the 0,0 coordinate is in the bottom left corner tintin uses
  312. a standard x,y notation. This type of argument is used by the
  313. #map jump command.
  314. The vast majority of tintin commands use y,x / row,col notation,
  315. primarily because that is the notation used by the VT100 standard
  316. used for terminal emulation.
  317. </span><span style='color:#5F5'>Squares
  318. </span><span style='color:#AAA'>
  319. A square argument takes 2 coordinates. The first coordinate defines
  320. the upper left corner, the last coordinate defines the bottom
  321. right corner. The upper left corner of the terminal is defined as
  322. 1,1 and the bottom right corner as -1,-1. This type of argument is
  323. used by #draw, #button and #map offset.
  324. </span><span style='color:#5F5'>Panes
  325. </span><span style='color:#AAA'>
  326. A pane argument takes 4 size values, which are: top pane, bottom
  327. pane, left pane, right pane. When a negative value is provided the
  328. size is the maximum size, minus the value. This type of argument
  329. is used by the #split command.
  330. </span><span style='color:#5F5'>Ranges
  331. </span><span style='color:#AAA'>
  332. A range argument takes 2 values known as the upper bound and lower
  333. bound. The upper bound (first value) defines the start of the
  334. range, the lower bound (second value) the end. The first index of
  335. a range is defined as 1. When a negative value is provides the last
  336. index is defined as -1. This type of argument is used by #buffer
  337. and #variable.
  338. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  339. <a name='EDITING'></a>
  340. </span><span style='color:#FF5'> EDITING
  341. </span><span style='color:#AAA'>
  342. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  343. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt b </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor backward word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  344. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  345. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt f </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor forward word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  346. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  347. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  348. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl a </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  349. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  350. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl b </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor backward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  351. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  352. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl c </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  353. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  354. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl d </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete or exit </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  355. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  356. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl e </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  357. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  358. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl f </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor forward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  359. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  360. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl g </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  361. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  362. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl h </span><span style='color:#0AA'>││</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  363. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  364. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl i </span><span style='color:#0AA'>││</span><span style='color:#FFF'>tab </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  365. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  366. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl j </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  367. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  368. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl k </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  369. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  370. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl l </span><span style='color:#0AA'>││</span><span style='color:#FFF'>redraw input </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  371. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  372. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl m </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  373. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  374. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl n </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history next </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  375. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  376. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl o </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  377. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  378. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl p </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history prev </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  379. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  380. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl q </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  381. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  382. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl r </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history search </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  383. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  384. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl s </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  385. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  386. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl t </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer lock </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  387. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  388. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl u </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  389. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  390. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl v </span><span style='color:#0AA'>││</span><span style='color:#FFF'>convert meta characters </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  391. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  392. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl w </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete word left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  393. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  394. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl x </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  395. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  396. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl y </span><span style='color:#0AA'>││</span><span style='color:#FFF'>paste </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  397. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  398. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl z </span><span style='color:#0AA'>││</span><span style='color:#FFF'>suspend </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  399. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  400. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  401. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow left </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  402. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  403. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow right </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  404. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  405. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow up </span><span style='color:#0AA'>││</span><span style='color:#FFF'>previous input line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  406. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  407. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow down </span><span style='color:#0AA'>││</span><span style='color:#FFF'>next input line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  408. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  409. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  410. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl arrow left </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor left word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  411. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  412. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl arrow right </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor right word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  413. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  414. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  415. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  416. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  417. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  418. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  419. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  420. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  421. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  422. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>delete </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  423. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  424. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl delete </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete word right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  425. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  426. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  427. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>end </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  428. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  429. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl end </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  430. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  431. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  432. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  433. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  434. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>shift-enter </span><span style='color:#0AA'>││</span><span style='color:#FFF'>soft enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  435. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  436. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  437. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>home </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  438. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  439. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl home </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  440. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  441. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  442. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>page up </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer up </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  443. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  444. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>page down </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer down </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  445. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  446. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  447. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>tab </span><span style='color:#0AA'>││</span><span style='color:#FFF'>complete word forward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  448. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  449. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>shift-tab </span><span style='color:#0AA'>││</span><span style='color:#FFF'>complete word backward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  450. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  451. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CURSOR'>cursor</a>, <a href='#EDIT'>edit</a> and <a href='#MACRO'>macro</a>.
  452. <a name='ESCAPE CODES'></a>
  453. </span><span style='color:#FF5'> ESCAPE CODES
  454. </span><span style='color:#AAA'> You may use the escape character &bsol; for various special characters.
  455. &bsol;a beep the terminal.
  456. &bsol;c send a control character, &bsol;ca for ctrl-a.
  457. &bsol;e start an escape sequence.
  458. &bsol;f send a form feed.
  459. &bsol;n send a line feed.
  460. &bsol;r send a carriage return.
  461. &bsol;t send a horizontal tab.
  462. &bsol;x print an 8 bit character using hexadecimal, &bsol;xFF for example.
  463. &bsol;x7B send the '{' character.
  464. &bsol;x7D send the '}' character.
  465. &bsol;u print a 16 bit unicode character, &bsol;uFFFD for example.
  466. &bsol;u{} print a 8-21 bit unicode character, &bsol;u{2AF21} for example.
  467. &bsol;U print a 21 bit unicode character, &bsol;U02AF21 for example.
  468. &bsol;v send a vertical tab
  469. Ending a line with &bsol; will stop tintin from appending a line feed.
  470. To escape arguments in an alias or action use %%0 %%1 %%2 etc.
  471. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  472. <a name='GREETING'></a>
  473. </span><span style='color:#FF5'> GREETING
  474. </span><span style='color:#0AA'> ####################################################################
  475. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  476. #</span><span style='color:#AAA'> T I N T I N + + 2.02.21b </span><span style='color:#0AA'>#
  477. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  478. #</span><span style='color:#AAA'> Code by Peter Unold, Bill Reis, and Igor van den Hoven </span><span style='color:#0AA'>#
  479. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  480. ####################################################################
  481. <a name='KEYPAD'></a>
  482. </span><span style='color:#FF5'> KEYPAD
  483. </span><span style='color:#AAA'> When TinTin++ starts up it sends &bsol;e= to the terminal to enable the
  484. terminal's application keypad mode, which can be disabled using #show {&bsol;e&gt;}
  485. </span><span style='color:#FFF'> Configuration A Configuration B Configuration C</span><span style='color:#0AA'>
  486. ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮
  487. │</span><span style='color:#FFF'>num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>-</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>-</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>Num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp-</span><span style='color:#0AA'> │
  488. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  489. │</span><span style='color:#FFF'>7</span><span style='color:#0AA'> │</span><span style='color:#FFF'>8</span><span style='color:#0AA'> │</span><span style='color:#FFF'>9</span><span style='color:#0AA'> │</span><span style='color:#FFF'>+</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>Home</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Up</span><span style='color:#0AA'> │</span><span style='color:#FFF'>PgUp</span><span style='color:#0AA'> │</span><span style='color:#FFF'>+</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>nkp7</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp8</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp9</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp+</span><span style='color:#0AA'> │
  490. ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │
  491. │</span><span style='color:#FFF'>4</span><span style='color:#0AA'> │</span><span style='color:#FFF'>5</span><span style='color:#0AA'> │</span><span style='color:#FFF'>6</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>Left</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Cntr</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Right</span><span style='color:#0AA'>│ │ │</span><span style='color:#FFF'>nkp4</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp5</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp6</span><span style='color:#0AA'> │ │
  492. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  493. │</span><span style='color:#FFF'>1</span><span style='color:#0AA'> │</span><span style='color:#FFF'>2</span><span style='color:#0AA'> │</span><span style='color:#FFF'>3</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Enter</span><span style='color:#0AA'>│ │</span><span style='color:#FFF'>End</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Down</span><span style='color:#0AA'> │</span><span style='color:#FFF'>PgDn</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Enter</span><span style='color:#0AA'>│ │</span><span style='color:#FFF'>nkp1</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp2</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp3</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkpEn</span><span style='color:#0AA'>│
  494. ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │
  495. │</span><span style='color:#FFF'>0</span><span style='color:#0AA'> │</span><span style='color:#FFF'>.</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>Ins</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Del</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>nkp0</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp.</span><span style='color:#0AA'> │ │
  496. ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯
  497. </span><span style='color:#AAA'>
  498. With keypad mode disabled numlock on will give you configuration A,
  499. and numlock off will give you configuration B. With keypad mode
  500. enabled you'll get configuration C.
  501. </span><span style='color:#FFF'> Terminals that support keypad mode
  502. </span><span style='color:#AAA'> Linux Console, PuTTY, MinTTY, Eterm, aterm.
  503. </span><span style='color:#FFF'> Terminals that do not support keypad mode
  504. </span><span style='color:#AAA'> RXVT on Cygwin, Windows Console, Gnome Terminal, Konsole.
  505. </span><span style='color:#FFF'> Peculiar Terminals
  506. </span><span style='color:#AAA'> RXVT requires turning off numlock to enable configuration C.
  507. Xterm may require disabling Alt/NumLock Modifiers (num-lock) in the
  508. ctrl left-click menu. Or edit ~/.Xresources and add
  509. XTerm*VT100.numLock:false
  510. Mac OS X Terminal requires enabling 'strict vt100 keypad behavior' in
  511. Terminal -&gt; Window Settings -&gt; Emulation.
  512. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  513. <a name='LISTS'></a>
  514. </span><span style='color:#FF5'> LISTS
  515. </span><span style='color:#AAA'> There are several different types of lists in tintin which behave in a
  516. fairly universal manner. To properly explain lists it's easiest to
  517. explain the most basic variable type first before discussing more
  518. complex types.
  519. - Basic variable: The standard key = value variable.
  520. - Simple list: A string that contains semicolon delimited fields.
  521. {a;b;c}. Can be saved as a variable.
  522. - Brace list: A string in which fields are delimited with braces.
  523. {a}{b}{c}. Brace lists cannot be stored as a variable because tables
  524. use braces as well, they must be stored as a simple list instead.
  525. - Table: Think of this as variables nested within another variable. Or
  526. as variables contained within another variable.
  527. - List: A table that uses integers for its indexes. Also known as an
  528. array. The #list command is a utility command for using tables as
  529. arrays.
  530. </span><span style='color:#5F5'> Simple Variables
  531. </span><span style='color:#AAA'>
  532. </span><span style='color:#FFF'>Example:
  533. </span><span style='color:#AAA'> #variable {simple} {Hello World!}
  534. #show &dollar;simple
  535. To see if the 'simple' variable exists you can use &amp;{simple} which
  536. will display 0 if the variable does not exist, or the variable's index
  537. if it exists.
  538. If you have multiple variables they are sorted alphabetically and
  539. numerically. While it's not all that relevant for simple variables,
  540. the first variable has index 1, the second variable index 2, and so
  541. on.
  542. Variable names need to start with a letter and only exist of letters,
  543. numbers, and underscores. If you need to use a non standard variable
  544. name this is possible using braces.
  545. </span><span style='color:#FFF'>Example: </span><span style='color:#AAA'>#variable {:)} {Happy Happy!};#show &dollar;{:)}
  546. Variables can be accessed using their index. While primarily useful
  547. for tables it is possible to do this for simple variables. Use +1 for
  548. the first variable, +2 for the second variable, etc. Use -1 for the
  549. last variable, -2 for the second last variable, etc.
  550. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #show The first variable is: *{+1} with value: &dollar;{+1}
  551. </span><span style='color:#5F5'> Removing Variables
  552. </span><span style='color:#AAA'>
  553. To remove a variable, use #unvariable or #unvar (every command can be
  554. abbreviated). It's possible to remove multiple variables at once
  555. using #unvar {var 1} {var 2} {etc}
  556. Variables are unique to each session, so if you have multiple
  557. sessions, removing a variable from one session won't remove it from
  558. other sessions.
  559. If you remove a table variable, all variables contained within that
  560. table variable are removed as well.
  561. </span><span style='color:#5F5'> Simple Lists
  562. </span><span style='color:#AAA'>
  563. A simple list is a string that contains semicolon delimited fields.
  564. Commands can be entered as simple lists, for example:
  565. #show {a};#show {b} will execute a single line as two commands.
  566. Several commands take a simple list as their input, these are:
  567. #foreach, #line substitute, #path load, #list create, and #highlight.
  568. </span><span style='color:#5F5'> Brace Lists
  569. </span><span style='color:#AAA'>
  570. A brace list is a string in which fields are delimited with braces.
  571. Most commands take a brace list for their arguments, for example:
  572. #session {x} {mud.com} {1234} {mud.tin}. The session command takes
  573. 4 arguments, the 4th argument (command file) is optional.
  574. Commands that take a simple list as their input will also accept a
  575. brace list, keep in mind you'll have to embed the brace list in an
  576. extra set of braces, for example: #path load {{n}{s}{w}{w}}, which is
  577. identical to: #path load {n;s;w;w}.
  578. Brace lists cannot be stored as variables because TinTin++ will
  579. confuse them with tables. You can convert a brace list to a table
  580. variable using: #list {bracelist} {create} {{a}{b}{c}} this will look
  581. internally as: {{1}{a}{2}{b}{3}{c}}. You can then convert this table
  582. back to a simple list using: #list {bracelist} {simplify} which will
  583. change it to {a;b;c}.
  584. Braces cannot easily be escaped in TinTin++. Using &bsol;{ or &bsol;} will not
  585. work. The reason for this is due to several factors, but primarily
  586. backward compatibility. To escape braces you must define them using
  587. hexadecimal notation using &bsol;x7B and &bsol;x7D. See #help escape for a list
  588. of escape options, and the help file will also remind you of how to
  589. escape braces.
  590. </span><span style='color:#5F5'> Tables
  591. </span><span style='color:#AAA'>
  592. Tables are key/value pairs stored within a variable. Tables are also
  593. known as associative arrays, dictionaries, maps, nested variables,
  594. structures, and probably a couple of other names. There are several
  595. ways to create and access tables.
  596. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #variable {friendlist} {{bob}{bob@mail.com} {bubba}{sunset@gmail.com}}
  597. This will create a friendlist with two entries, the key is the name of
  598. the friend, the value is the email address of the friend. You can see
  599. the email address of bob using: #show {&dollar;friendlist[bob]}. You can
  600. also define this table as following:
  601. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  602. #variable {friendlist[bob]} {bob@mail.com}
  603. #variable {friendlist[bubba]} {sunset@gmail.com}
  604. This would create the exact same table as the single line declaration
  605. used previously. To see the first key in the table use:
  606. *friendlist[+1], to see the first value in the table use:
  607. &dollar;friendlist[+1]. To see the size of the table use &amp;friendlist[]. To
  608. print a bracelist of all friends use *friendlist[], to print a
  609. bracelist of all friends whose name starts with the letter 'a' you
  610. would use: *friendlist[a%*]. Similarly to see the number of friends
  611. you have whose name ends with the letter 'b' you would use:
  612. &amp;friendlist[%*b].
  613. See #help regexp for a brief overview of regular expression options.
  614. While TinTin++ supports PCRE (perl-compatible regular expressions), it
  615. embeds them within its own regular expression syntax that is simpler
  616. and less invasive, while still allowing the full power of PCRE for
  617. those who need it.
  618. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #unvariable {friendlist[bubba]}
  619. This would remove {bubba} from the friendlist. To remove the entire
  620. friendlist you would use: #unvariable {friendlist}.
  621. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #variable {friendlist} {{bob} {{email}{bob@ma.il} {phone}{123456789}}}
  622. There is no limit to the number of nests, simply add more braces. To
  623. see Bob's email in this example you would use:
  624. #show {&dollar;friendlist[bob][email]}.
  625. To merge two tables the #cat command can be used.
  626. </span><span style='color:#FFF'>Example:
  627. </span><span style='color:#AAA'> #variable {bli} {{a}{1}{b}{2}}
  628. #variable {blo} {{c}{3}{d}{4}}
  629. #cat {blo} {&dollar;bli}
  630. </span><span style='color:#5F5'> Lists
  631. </span><span style='color:#AAA'> Tables are sorted alphabetically with the exception of numbers which
  632. are sorted numerically. If you want to determine the sorting order
  633. yourself you can use use the #list command which helps you to use
  634. tables as arrays.
  635. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #action {%1 chats %2} {#list chats add {%0}}
  636. Each time a chat is received it's added to the end of the 'chats' list
  637. variable. If you type #variable chats this might look like:
  638. </span><span style='color:#FF5'>#</span><span style='color:#5FF'>VARIABLE </span><span style='color:#A0A'>{</span><span style='color:#FFF'>chats</span><span style='color:#A0A'>}
  639. {
  640. {</span><span style='color:#FFF'>1</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bubba chats Hi</span><span style='color:#A0A'>}
  641. {</span><span style='color:#FFF'>2</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bob chats Hi bub</span><span style='color:#A0A'>}
  642. {</span><span style='color:#FFF'>3</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bubba chats Bye</span><span style='color:#A0A'>}
  643. {</span><span style='color:#FFF'>4</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bob chats bub bye</span><span style='color:#A0A'>}
  644. }
  645. </span><span style='color:#5F5'> Parsing
  646. </span><span style='color:#AAA'>
  647. There are various ways to parse lists and tables, using either #loop,
  648. #foreach, #while, or #&lt;number&gt;.
  649. #loop takes two numeric arguments, incrementing or decrementing the
  650. first number until it matches the second number. The value of the loop
  651. counter is stored in the provided variable.
  652. #foreach takes either a simple list or a brace list as its first
  653. argument. Foreach will go through each item in the list and store the
  654. value in the provided variable.
  655. #while will perform an if check on the first argument, if the result
  656. is true it will execute the commands in the second argument. Then it
  657. performs an if check on the first argument again. It will continue to
  658. repeat until the if check returns 0 or the loop is interrupted with a
  659. control flow command. It takes special care to avoid infinite loops.
  660. #&lt;number&gt; will execute the provided argument 'number' times. For
  661. example: #4 {#show beep! &bsol;a}
  662. Here are some examples.
  663. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #list friends create {bob;bubba;zorro}
  664. Internally this looks like {{1}{bob}{2}{bubba}{3}{zorro}} and the
  665. list can be parsed in various ways.
  666. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #foreach {&dollar;friends[%*]} {name} {#show &dollar;name}
  667. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #foreach {*friends[%*]} {i} {#show &dollar;friends[&dollar;i]}
  668. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #loop {1} {&amp;friends[]} {i} {#show &dollar;friends[+&dollar;i]}
  669. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #math i 1;#while {&amp;friends[+&dollar;i]} {#show &dollar;friends[+&dollar;i];
  670. #math i &dollar;i + 1}
  671. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #math i 1;#&amp;friends[] {#show &dollar;friends[+&dollar;i];#math i &dollar;i + 1}
  672. Each of the five examples above performs the same task; printing the
  673. three names in the friends list.
  674. If you want to get a better look at what goes on behind the scenes
  675. while executing scripts you can use '#debug all on'. To stop seeing
  676. debug information use '#debug all off'.
  677. </span><span style='color:#5F5'> List Tables
  678. </span><span style='color:#AAA'> List tables are also known as databases and the #list command has
  679. several options to manipulate them.
  680. For these options to work properly all tables need to have identical
  681. keys. Here is an example list table.
  682. #var {friendlist}
  683. {
  684. {1}{{name}{bob} {age}{54}}
  685. {2}{{name}{bubba} {age}{21}}
  686. {3}{{name}{pamela} {age}{36}}
  687. }
  688. To sort the list table by age you would use:
  689. #list friendlist indexate age
  690. #list friendlist order
  691. To remove everyone whose name starts with a 'b' you would use:
  692. #list friendlist indexate name
  693. #list friendlist filter {} {b%*}
  694. The filter option only supports regular expressions. To filter
  695. using mathematics you would loop through the list backwards:
  696. #loop &amp;friendlist[] 1 index
  697. {
  698. #if {&dollar;friendlist[+&dollar;index][age] &lt; 30}
  699. {
  700. #list friendlist delete &dollar;index
  701. }
  702. }
  703. Alternatively you can use the refine option.
  704. #list friendlist indexate age
  705. #list friendlist refine {&amp;0 &gt;= 30}
  706. To add an item to a list table there are two options:
  707. #list friendlist add {{{name}{hobo} {age}{42}}}
  708. #list friendlist insert -1 {{name}{hobo} {age}{42}}
  709. </span><span style='color:#5F5'> Optimization
  710. </span><span style='color:#AAA'>
  711. TinTin++ tables are exceptionally fast while they remain under 100
  712. items. Once a table grows beyond 10000 items there can be performance
  713. issues when inserting and removing items in the beginning or middle of
  714. the table.
  715. The plan is to eventually implement an indexable and flexible data
  716. structure for large tables.
  717. If you load a large table from file it's important to make sure it's
  718. sorted, when using #write to save a table it's automatically sorted.
  719. If you notice performance issues on large tables it's relatively easy
  720. to create a hash table.
  721. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  722. #alias {sethash}
  723. {
  724. #format hash %H %1;
  725. #math hash1 &dollar;hash % 100;
  726. #math hash2 &dollar;hash / 100 % 100;
  727. #var hashtable[&dollar;hash1][&dollar;hash2][%1] %2
  728. }
  729. #function {gethash}
  730. {
  731. #format hash %H %1;
  732. #math hash1 &dollar;hash % 100;
  733. #math hash2 &dollar;hash / 100 % 100;
  734. #return &dollar;hashtable[&dollar;hash1][&dollar;hash2][%1]
  735. }
  736. #alias {test}
  737. {
  738. sethash bli hey;
  739. sethash bla hi;
  740. sethash blo hello;
  741. #show The value of bla is: @gethash{bla}
  742. }
  743. The above script will rapidly store and retrieve over 1 million items.
  744. Looping through a hash table is relatively easy as well.
  745. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  746. #alias {showhash}
  747. {
  748. #foreach {*hashtable[%*]} {hash1}
  749. {
  750. #foreach {*hashtable[&dollar;hash1][%*]} {hash2}
  751. {
  752. #echo {%-20s = %s}
  753. {hashtable[&dollar;hash1][&dollar;hash2]}
  754. {&dollar;hashtable[&dollar;hash1][&dollar;hash2]}
  755. }
  756. }
  757. }
  758. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  759. <a name='MAPPING'></a>
  760. </span><span style='color:#FF5'> MAPPING
  761. </span><span style='color:#AAA'>
  762. TinTin++ has a powerful automapper that uses a room system similar to
  763. Diku MUDs which means that odd map layouts and weird exit
  764. configurations aren't a problem. The mapper provides tools to improve
  765. the visual map display. For basic path tracking see #help PATH.
  766. </span><span style='color:#FFF'> #map create [size]
  767. </span><span style='color:#AAA'>
  768. This command creates the initial map. The size is 50,000 by default
  769. and can be changed at any time with the #map resize command. If you
  770. play a MUD that uses MSDP or GMCP to provide room numbers you'll have
  771. to increase it to the highest reported room number. Increasing the
  772. size of the map doesn't decrease performance.
  773. </span><span style='color:#FFF'> #map goto &lt;location&gt;
  774. </span><span style='color:#AAA'>
  775. When you create the map you are not automatically inside the map. By
  776. default room number (vnum) 1 is created, so you can go to it using
  777. #map goto 1. Once you are inside the map new rooms are automatically
  778. created as you move around. Movement commands are defined with the
  779. pathdir command. By default n, ne, e, se, s, sw, w, nw, u, d are
  780. defined.
  781. </span><span style='color:#FFF'>
  782. #map map &lt;rows&gt; &lt;cols&gt; &lt;append|overwrite|list|variable&gt; &lt;name&gt;
  783. </span><span style='color:#AAA'>
  784. To see the map you can use #map map. It's annoying to have to
  785. constantly type #map map however. Instead it's possible to use #split
  786. to display a vt100 map. To do so execute:
  787. </span><span style='color:#FFF'>#split 16 1
  788. #map flag vtmap on</span><span style='color:#AAA'>
  789. The first command sets the top split lines to 16 and the bottom split
  790. line to 1. If you want a smaller or larger map display you can use a
  791. different value than 16.
  792. If you don't need to display diagonal exits and prefer a more compact
  793. look you can use #map flag AsciiGraphics off. This will enable the
  794. standard display which uses UTF-8 box drawing characters, results may
  795. vary depending on the font used.
  796. If your terminal supports UTF-8 you can also give #map flag unicode on
  797. a try.
  798. If you want to display the map in a different location of the screen
  799. use something like:
  800. </span><span style='color:#FFF'>#split 0 1 0 -80
  801. #map offset 1 81 -4 -1</span><span style='color:#AAA'>
  802. This will display the map on the right side of the screen, if the
  803. width of the screen is wide enough.
  804. </span><span style='color:#FFF'>
  805. #map undo
  806. </span><span style='color:#AAA'>
  807. If you accidentally walk into the wall on your MUD the mapper will
  808. still create a new room. You can easily fix this mistake by using
  809. #map undo. If you want to move around on the map without moving around
  810. on the MUD you can use: #map move {direction}. To delete a room
  811. manually you can use: #map delete {direction}. To create a room
  812. manually you can use: #map dig {direction}.
  813. </span><span style='color:#FFF'>
  814. #map write &lt;filename&gt;
  815. </span><span style='color:#AAA'>
  816. You can save your map using #map write, to load a map you can use
  817. #map read &lt;filename&gt;.
  818. </span><span style='color:#FFF'>
  819. #map set &lt;option&gt; &lt;value&gt;
  820. </span><span style='color:#AAA'>
  821. You can set the room name using #map set roomname &lt;name&gt;. You either
  822. have to do this manually or create triggers to set the room name
  823. automatically. Once the room name is set you can use #map goto with
  824. the room name to visit it. If there are two rooms with the same name
  825. #map goto will go to the most nearby room. If you want to always go
  826. to the same room you should memorize the room number or create a
  827. landmark.
  828. </span><span style='color:#FFF'>
  829. #map landmark firstroom 1
  830. </span><span style='color:#AAA'>
  831. You can further narrow down the matches by providing additional
  832. arguments, for example:
  833. </span><span style='color:#FFF'>
  834. #map goto {dark alley} {roomexits} {n;e} {roomarea} {Haddock Ville}
  835. </span><span style='color:#AAA'>
  836. You can set the room weight using #map set roomweight {value}. The
  837. weight by default is set to 1.0 and it represents the difficulty of
  838. traversing the room. If you have a lake as an alternative route, and
  839. traversing water rooms is 4 times slower than regular rooms, then you
  840. could set the weight of the lake rooms to 4.0. If the lake is 3 rooms
  841. wide the total weight is 12. If walking around the lake has a weight
  842. less than 12 the mapper will go around the lake, if the weight is
  843. greater than 12 the mapper will take a route through the lake.
  844. You can set the room symbol using #map set roomsymbol {value}. The
  845. symbol should be one, two, or three characters, which can be
  846. colorized. You can for example mark shops with an 'S' and colorize the
  847. 'S' depending on what type of shop it is.
  848. </span><span style='color:#FFF'>
  849. #map run &lt;location&gt; &lt;delay&gt;
  850. </span><span style='color:#AAA'>
  851. The run command will have tintin find the shortest path to the given
  852. location and execute the movement commands to get there. You can
  853. provide a delay in seconds with floating point precision, for example:
  854. </span><span style='color:#FFF'>
  855. #map run {dark alley} {0.5}
  856. </span><span style='color:#AAA'>
  857. This will make you walk towards the nearest dark alley with 0.5 second
  858. intervals. Typical MUDs accept commands at 0.25 second intervals.
  859. </span><span style='color:#FFF'>
  860. #map insert {direction} {flag}
  861. </span><span style='color:#AAA'>
  862. The insert command is useful for adding spacer rooms called void rooms.
  863. Often rooms overlap, and by adding void rooms you can stretch out
  864. exits. For example: #map insert north void. You cannot enter void rooms
  865. once they've been created, so you'll have to use #map info in an
  866. adjacent room to find the room vnum, then use #map goto {vnum} to
  867. visit.
  868. It's also possible to align rooms using void rooms. This is easily
  869. done using #map insert north void.
  870. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a>, <a href='#PATH'>path</a> and <a href='#PATHDIR'>pathdir</a>.
  871. <a name='MATHEMATICS'></a>
  872. </span><span style='color:#FF5'> MATHEMATICS
  873. </span><span style='color:#FFF'>Number operations
  874. </span><span style='color:#AAA'> Operators Priority Function
  875. ------------------------------------------------
  876. ! 0 logical not
  877. ~ 0 bitwise not
  878. * 1 integer multiply
  879. ** 1 integer power
  880. / 1 integer divide
  881. // 1 integer sqrt // 2 or cbrt // 3
  882. % 1 integer modulo
  883. d 1 integer random dice roll
  884. + 2 integer addition
  885. - 2 integer subtraction
  886. &lt;&lt; 3 bitwise shift
  887. &gt;&gt; 3 bitwise shift
  888. &gt; 4 logical greater than
  889. &gt;= 4 logical greater than or equal
  890. &lt; 4 logical less than
  891. &lt;= 4 logical less than or equal
  892. == 5 logical equal
  893. != 5 logical not equal
  894. &amp; 6 bitwise and
  895. ^ 7 bitwise xor
  896. | 8 bitwise or
  897. &amp;&amp; 9 logical and
  898. ^^ 10 logical xor
  899. || 11 logical or
  900. Operator priority can be ignored by using parentheses, for example (1 + 1) * 2
  901. equals 4, while 1 + 1 * 2 equals 3.
  902. </span><span style='color:#FFF'>String operations</span><span style='color:#AAA'>
  903. Operators Priority Function
  904. ------------------------------------------------
  905. &gt; 4 alphabetical greater than
  906. &gt;= 4 alphabetical greater than or equal
  907. &lt; 4 alphabetical less than
  908. &lt;= 4 alphabetical less than or equal
  909. == 5 alphabetical equal using regex
  910. != 5 alphabetical not equal using regex
  911. === 5 alphabetical equal
  912. !== 5 alphabetical not equal
  913. Strings must be encased in double quotes or braces. The &gt; &gt;= &lt; &lt;= operators
  914. perform basic string comparisons. The == != operators perform regular
  915. expressions, with the argument on the left being the string, and the argument
  916. on the right being the regex. For example {bla} == {%*a} would evaluate as 1.
  917. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MATH'>math</a> and <a href='#REGEXP'>regexp</a>.
  918. <a name='METRIC SYSTEM'></a>
  919. </span><span style='color:#FF5'> METRIC SYSTEM
  920. </span><span style='color:#AAA'>
  921. Name Symbol Factor
  922. --------------------------------------------------
  923. Mega M 1 000 000
  924. Kilo K 1 000
  925. milli m 0.001
  926. micro u 0.000 001
  927. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#FORMAT'>format</a> and <a href='#MATH'>math</a>.
  928. <a name='MOUSE'></a>
  929. </span><span style='color:#FF5'> MOUSE
  930. </span><span style='color:#AAA'>
  931. To enable xterm mouse tracking use #CONFIG MOUSE ON.
  932. To see mouse events as they happen use #CONFIG MOUSE INFO. This
  933. information can then be used to create mouse events with the #event
  934. command and buttons with the #button command.
  935. Visual buttons and pop-ups can be drawn on the screen with the #draw
  936. command.
  937. The input field can be changed and renamed using #screen inputregion,
  938. which allows creating named events for enter handling.
  939. Links can be created using the MSLP protocol which will generate link
  940. specific events when clicked.
  941. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUTTON'>button</a>, <a href='#DRAW'>draw</a>, <a href='#EVENT'>event</a> and <a href='#MSLP'>MSLP</a>.
  942. <a name='MSDP'></a>
  943. </span><span style='color:#FF5'> MSDP
  944. </span><span style='color:#AAA'>
  945. MSDP (Mud Server Data Protocol) is part of the #port functionality.
  946. See #help event for additional documentation as all MSDP events are
  947. available as regular events.
  948. Available MSDP events can be queried using the MSDP protocol
  949. as described in the specification.
  950. </span><span style='color:#FFF'>
  951. https://tintin.sourceforge.io/protocols/msdp
  952. Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#PORT'>port</a>.
  953. <a name='MSLP'></a>
  954. </span><span style='color:#FF5'> MSLP
  955. </span><span style='color:#AAA'>
  956. MSLP (Mud Server Link Protocol) requires enabling #config mouse on,
  957. and creating the appropriate LINK events.
  958. The simplest link can be created by surrounding a keyword with the
  959. &bsol;e[4m and &bsol;e[24m tags.
  960. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #substitute {&bsol;b{n|e|s|w|u|d}&bsol;b} {&bsol;e[4m%1&bsol;e[24m}
  961. This would display 'Exits: n, e, w.' as 'Exits: n, e, w.'.
  962. When clicked this would trigger the PRESSED LINK MOUSE BUTTON ONE
  963. event of which %4 will hold the link command and %6 holds the
  964. link name, which in the case of a simple link will be empty.
  965. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {PRESSED LINK MOUSE BUTTON ONE} {#send {%4}}
  966. Keep in mind that if you change PRESSED to DOUBLE-CLICKED the link
  967. will only work if the text does not scroll in between clicks.
  968. If you want to create a complex link use an OSC code.
  969. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {&bsol;bsmurf&bsol;b} {&bsol;e]68;1;;say I hate smurfs!&bsol;a&bsol;e[4m%0&bsol;e[24m}
  970. If you have the LINK event of the previous example set, the %4
  971. argument will contain 'say I hate smurfs!'.
  972. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {&bsol;bgoblin&bsol;b} {&bsol;e]68;1;SEND;kill goblin&bsol;a&bsol;e[4m%0&bsol;e[24m}
  973. Notice the previous instance of ;; has been replaced with ;SEND;
  974. which will name the link. This will generate a named event.
  975. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {PRESSED LINK SEND MOUSE BUTTON ONE} {#send {%4}}
  976. By naming links you can organize things a little bit better instead
  977. of tunneling everything through the same event.
  978. Keep in mind that the server is allowed to use &bsol;e]68;1;&bsol;a as well,
  979. subsequently various security measures are in place.
  980. To create secure links, which are filtered out when send by a server,
  981. you need to use &bsol;e]68;2;&bsol;a, and they instead trigger the SECURE LINK
  982. event.
  983. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {%* tells %*} {&bsol;e]68;2;EXEC;#cursor set tell %1 &bsol;a&bsol;e[4m%0&bsol;e[24m}
  984. </span><span style='color:#FFF'> </span><span style='color:#AAA'> #event {PRESSED SECURE LINK EXEC MOUSE BUTTON ONE} {%4}
  985. This would make you start a reply when clicking on a tell.
  986. </span><span style='color:#FFF'>Website</span><span style='color:#AAA'>: https://tintin.mudhalla.net/protocols/mslp
  987. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#PORT'>port</a>.
  988. <a name='PCRE'></a>
  989. </span><span style='color:#FF5'> PCRE
  990. </span><span style='color:#AAA'>
  991. A regular expression, regex or regexp is a sequence of characters that
  992. defines a search pattern. Since the 1980s, different syntaxes for
  993. writing regular expressions exist, the two most widely used ones being
  994. the POSIX syntax and the similar but more advanced Perl standard.
  995. TinTin++ supports the Perl standard known as PCRE (Perl Compatible
  996. Regular Expressions).
  997. Regular expressions are an integral part of TinTin++, but keep in mind
  998. that tintin doesn't allow you to use regular expressions directly,
  999. instead it uses a simpler intermediate syntax that still allows more
  1000. complex expressions when needed.
  1001. Commands that utilize regular expressions are: action, alias, elseif,
  1002. gag, grep, highlight, if, kill, local, math, prompt, regexp, replace,
  1003. substitute, switch, variable and while. Several other commands use
  1004. regular expressions in minor ways. Fortunately the basics are very
  1005. easy to learn.
  1006. </span><span style='color:#FFF'> TinTin++ Regular Expression</span><span style='color:#AAA'>
  1007. The following support is available for regular expressions.
  1008. ^ match start of line.
  1009. &dollar; match of end of line.
  1010. &bsol; escape one character.
  1011. %1-%99 match of any text, stored in the corresponding index.
  1012. %0 should be avoided in the regex, contains all matched text.
  1013. { } embed a perl compatible regular expression, matches are stored.
  1014. %!{ } embed a perl compatible regular expression, matches are not stored.
  1015. [ ] . + | ( ) ? * are treated as normal text unless used within braces. Keep in
  1016. mind that { } is replaced with ( ) automatically unless %!{ } is used.
  1017. </span><span style='color:#FFF'>
  1018. TinTin++ Description POSIX</span><span style='color:#AAA'>
  1019. %d Match zero to any number of digits ([0-9]*?)
  1020. %D Match zero to any number of non-digits ([^0-9]*?)
  1021. %i Matches become case insensitive (?i)
  1022. %I Matches become case sensitive (default) (?-i)
  1023. %s Match zero to any number of spaces ([&bsol;r&bsol;n&bsol;t ]*?)
  1024. %w Match zero to any number of word characters ([A-Za-z0-9_]*?)
  1025. %W Match zero to any number of non-word characters ([^A-Za-z0-9_]*?)
  1026. %? Match zero or one character (.??)
  1027. %. Match one character (.)
  1028. %+ Match one to any number of characters (.+?)
  1029. %* Match zero to any number of characters (.*?)
  1030. </span><span style='color:#FFF'>
  1031. Variables</span><span style='color:#AAA'>
  1032. If you use %1 in an action to perform a match the matched string is
  1033. stored in the %1 variable which can be used in the action body.
  1034. Example: #act {%1 says 'Tickle me'} {tickle %1}
  1035. If you use %2 the match is stored in %2, etc. If you use an unnumbered
  1036. match like %* or %S the match is stored at the last used index
  1037. incremented by one.
  1038. Example: #act {%3 says '%*'} {#if {&quot;%4&quot; == &quot;Tickle me&quot;} {tickle %3}}
  1039. The maximum variable index is 99. If you begin an action with %* the
  1040. match is stored in %1. You should never use %0 in the trigger part of
  1041. an action, when used in the body of an action %0 contains all the parts
  1042. of the string that were matched.
  1043. To prevent a match from being stored use %!*, %!w, etc.
  1044. </span><span style='color:#FFF'>
  1045. Perl Compatible Regular Expressions</span><span style='color:#AAA'>
  1046. You can embed a PCRE (Perl Compatible Regular Expression) using curley
  1047. braces { }, these braces are replaced with parentheses ( ) unless you
  1048. use %!{ }.
  1049. </span><span style='color:#FFF'>
  1050. Or</span><span style='color:#AAA'>
  1051. You can separate alternatives within a PCRE using the | character.
  1052. Example: #act {%* raises {his|her|its} eyebrows.} {say 42..}
  1053. </span><span style='color:#FFF'>
  1054. Brackets</span><span style='color:#AAA'>
  1055. You can group alternatives and ranges within a PCRE using brackets.
  1056. Example: #act {%* says 'Who is number {[1-9]}?} {say &dollar;number[%2] is number %2}
  1057. The example only triggers if someone provides a number between 1 and
  1058. 9. Any other character will cause the action to not trigger.
  1059. Example: #act {%* says 'Set password to {[^0-9]*}&dollar;} {say The password must
  1060. contain at least one number, not for security reasons, but just to
  1061. annoy you.} {4}
  1062. When the ^ character is used within brackets it creates an inverse
  1063. search, [^0-9] matches every character except for a number between 0
  1064. and 9.
  1065. </span><span style='color:#FFF'>
  1066. Quantification</span><span style='color:#AAA'>
  1067. A quantifier placed after a match specifies how often the match is
  1068. allowed to occur.
  1069. ? repeat zero or one time.
  1070. * repeat zero or multiple times.
  1071. + repeat once or multiple times.
  1072. {n} repeat exactly n times, n must be a number.
  1073. {n,} repeat at least n times, n must be a number.
  1074. {n,o} repeat between n and o times, n and o must be a number.
  1075. Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}}?} {Say &dollar;number[%2] is
  1076. number %2}
  1077. The example only triggers if someone provides a number between 1 and
  1078. 999.
  1079. </span><span style='color:#FFF'>Parantheses</span><span style='color:#AAA'>
  1080. TinTin Regular Expressions automatically add parenthesis, for example
  1081. %* translates to (.*?) in PCRE unless the %* is found at the start or
  1082. end of the line, in which cases it translates to (.*). Paranthesis in
  1083. PCRE causes a change in execution priority similar to mathematical
  1084. expressions, but parentheses also causes the match to be stored to a
  1085. variable.
  1086. When nesting multiple sets of parentheses each nest is assigned its
  1087. numerical variable in order of appearance.
  1088. Example: #act {%* chats '{Mu(ha)+}'} {chat %2ha!}
  1089. If someone chats Muha you will chat Muhaha! If someone chats Muhaha
  1090. you will chat Muhahaha!
  1091. </span><span style='color:#FFF'>Lazy vs Greedy</span><span style='color:#AAA'>
  1092. By default regex matches are greedy, meaning {.*} will capture as much
  1093. text as possible.
  1094. Example: #regex {bli bla blo} {^{.*} {.*}&dollar;} {#show Arg1=(&amp;1) Arg2=(&amp;2)}
  1095. This will display: Arg1=(bli bla) Arg2=(blo)
  1096. By appending a ? behind a regex it becomes lazy, meaning {.*?} will
  1097. capture as little text as possible.
  1098. Example: #regex {bli bla blo} {^{.*?} {.*?}&dollar;} {#show Arg1=(&amp;1) Arg2=(&amp;2)}
  1099. This will display: Arg1=(bli) Arg2=(bla blo).
  1100. </span><span style='color:#FFF'>Escape Codes</span><span style='color:#AAA'>
  1101. PCRE support the following escape codes.
  1102. </span><span style='color:#FFF'>
  1103. PCRE Description POSIX</span><span style='color:#AAA'>
  1104. &bsol;A Match start of string ^
  1105. &bsol;b Match word boundaries (^|&bsol;r|&bsol;n|&bsol;t| |&dollar;)
  1106. &bsol;B Match non-word boundaries [^&bsol;r&bsol;n&bsol;t ]
  1107. &bsol;c Insert control character &bsol;c
  1108. &bsol;d Match digits [0-9]
  1109. &bsol;D Match non-digits [^0-9]
  1110. &bsol;e Insert escape character &bsol;e
  1111. &bsol;f Insert form feed character &bsol;f
  1112. &bsol;n Insert line feed character &bsol;n
  1113. &bsol;r Insert carriage return character &bsol;r
  1114. &bsol;s Match spaces [&bsol;r&bsol;n&bsol;t ]
  1115. &bsol;S Match non-spaces [^&bsol;r&bsol;n&bsol;t ]
  1116. &bsol;t Insert tab character &bsol;t
  1117. &bsol;w Match letters, numbers, and underscores [A-Za-z0-9_]
  1118. &bsol;W Match non-letters, numbers, and underscores [^A-Za-z0-9_]
  1119. &bsol;x Insert hex character &bsol;x
  1120. &bsol;Z Match end of string &dollar;
  1121. &bsol;s matches one space, &bsol;s+ matches one or multiple spaces.
  1122. </span><span style='color:#FFF'>Color triggers</span><span style='color:#AAA'>
  1123. To make matching easier text triggers (Actions, Gags, Highlights,
  1124. Prompts, and Substitutes) have their color codes stripped. If you
  1125. want to create a color trigger you must start the triggers with a ~
  1126. (tilde). To make escape codes visible use #config {convert meta} on.
  1127. Example: #action {~&bsol;e[1;37m%1} {#var roomname %1}
  1128. If the room name is the only line on the server in bright white
  1129. white color trigger will save the roomname.
  1130. This covers the basics. PCRE has more options, most of which are
  1131. somewhat obscure, so you'll have to read a PCRE manual for additional
  1132. information.
  1133. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a> and <a href='#PATH'>path</a>.
  1134. <a name='REPEAT'></a>
  1135. </span><span style='color:#FF5'> REPEAT
  1136. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #</span><span style='color:#FFF'>[</span><span style='color:#AAA'>number</span><span style='color:#FFF'>] {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1137. Sometimes you want to repeat the same command multiple times. This is the
  1138. easiest way to accomplish that.
  1139. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #10 {buy bread}
  1140. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  1141. <a name='SCREEN READER'></a>
  1142. </span><span style='color:#FF5'> SCREEN READER
  1143. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #config </span><span style='color:#FFF'>{</span><span style='color:#AAA'>SCREEN READER</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>ON|OFF</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1144. Screen reader mode is enabled by using #config screen on. The main
  1145. purpose of the screen reader mode is to report to servers that a
  1146. screen reader is being used by utilizing the MTTS standard. The MTTS
  1147. specification is available at:
  1148. http://tintin.sourceforge.net/protocols/mtts
  1149. With the screen reader mode enabled TinTin++ will try to remove visual
  1150. elements where possible.
  1151. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CONFIG'>config</a>
  1152. <a name='SESSIONNAME'></a>
  1153. </span><span style='color:#FF5'> SESSIONNAME
  1154. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: #[sessionname] </span><span style='color:#FFF'>{</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1155. You can create multiple sessions with the #session command. By default
  1156. only one session is active, meaning commands you input are executed in
  1157. the active session. While all sessions receive output, only output sent
  1158. to the active session is displayed.
  1159. When you create a session with the #session command you must specify a
  1160. session name, the session name, prepended with a hashtag, can be used
  1161. to activate the session when used without an argument. If an argument
  1162. is given it will be executed by that session as a command, the session
  1163. will not be activated.
  1164. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #ses one tintin.net 23;#ses two tintin.net 23;#one;#two grin
  1165. This will create two sessions, the session that was created last (two
  1166. in this case) will be automatically activated upon creation. Using
  1167. #one, session one is activated. Using #two grin, the grin social will
  1168. be executed by session two, session one will remain the active session.
  1169. If you send a variable to another session it will be substituted before
  1170. being passed. If you want the variable value of the receiving session
  1171. to be used you need to use '&dollar;&dollar;{variable}' to properly escape it.
  1172. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: @[sessionname]</span><span style='color:#FFF'>{</span><span style='color:#AAA'>substitution</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1173. If you want to pull the value of a variable from another session you
  1174. can do so in a similar way as you would use a #function call. Using
  1175. #showme {@two{&dollar;test}} in session one would print the value of &dollar;test,
  1176. as defined by session two.
  1177. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SUSPEND'>suspend</a>
  1178. <a name='SPEEDWALK'></a>
  1179. </span><span style='color:#FF5'> SPEEDWALK
  1180. </span><span style='color:#5F5'> SPEEDWALK V1
  1181. </span><span style='color:#AAA'>
  1182. Speedwalking allows you to enter multiple directions without using
  1183. semicolons. Directions should be prefixed with a number and will be
  1184. executed the given number of times.
  1185. You can enable speedwalking with #CONFIG {SPEEDWALK} {ON}.
  1186. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: Without speedwalk, you have to type:
  1187. </span><span style='color:#FFF'>s;s;w;w;w;w;w;s;s;s;w;w;w;n;n;w
  1188. </span><span style='color:#AAA'>With speedwalk, you only have to type:
  1189. </span><span style='color:#FFF'>2s5w3s3w2nw
  1190. </span><span style='color:#5F5'>SPEEDWALK V2
  1191. </span><span style='color:#AAA'>
  1192. Modern MUDs have increasingly adopted the use of diagonal exits, like
  1193. ne, nw, sw, and se. To make accomodations for this the #map and #path
  1194. command no longer interpret nesw as a speedwalk and require this to
  1195. be written as 1n1e1s1w, which then allows 2ne2e to execute ne;ne;e;e.
  1196. Speedwalks entered on the input line continue to use the v1 system.
  1197. The #path load command is backward compatible with v1 speedwalks and
  1198. to load v2 speedwalks the #path unzip command needs to be used, unless
  1199. the speedwalk was saved using #path save in which case a v2 compatible
  1200. format is used that can also contain timing data.
  1201. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #path unzip 3n1e2nw
  1202. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #map move 3ne1d
  1203. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#CURSOR'>cursor</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a> and <a href='#TAB'>tab</a>.
  1204. <a name='STATEMENTS'></a>
  1205. </span><span style='color:#FF5'> STATEMENTS
  1206. </span><span style='color:#AAA'>
  1207. TinTin++ knows the following statements.
  1208. #break
  1209. #case {value} {true}
  1210. #continue
  1211. #default {commands}
  1212. #else {commands}
  1213. #elseif {expression} {true}
  1214. #foreach {list} {variable} {commands}
  1215. #if {expression} {true}
  1216. #loop {min} {max} {variable} {commands}
  1217. #parse {string} {variable} {commands}
  1218. #return {value}
  1219. #switch {expression} {commands}
  1220. #while {expression} {commands}
  1221. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COMMANDS'>commands</a>, <a href='#HELP'>help</a> and <a href='#INFO'>info</a>.
  1222. <a name='SUBSTITUTIONS'></a>
  1223. </span><span style='color:#FF5'> SUBSTITUTIONS
  1224. </span><span style='color:#AAA'> TinTin++ will perform various types of substitions as detailed below.
  1225. </span><span style='color:#5F5'> Variables
  1226. </span><span style='color:#FFF'>&dollar; &amp; * @</span><span style='color:#AAA'> All variable and function names must begin with an alphabetic
  1227. character, followed by any combination of alphanumeric characters and
  1228. underscores.
  1229. </span><span style='color:#FFF'>&dollar;</span><span style='color:#AAA'> The dollar sign is used to retrieve the value of a variable.
  1230. </span><span style='color:#FFF'>&amp;</span><span style='color:#AAA'> The ampersand sign is used to retrieve the index of a variable.
  1231. </span><span style='color:#FFF'>*</span><span style='color:#AAA'> The astrix sign is used to retrieve the name of a variable.
  1232. </span><span style='color:#FFF'>@</span><span style='color:#AAA'> The at sign is used for functions.
  1233. </span><span style='color:#FFF'>[ ]</span><span style='color:#AAA'> Brackets are used for nested variables which function as an
  1234. associative array. Associative arrays are also known as tables and
  1235. maps. Regex can be used within brackets to match multiple variables.
  1236. </span><span style='color:#FFF'>+ -</span><span style='color:#AAA'> The plus and minus signs are used to access variables by their index,
  1237. with the first variable having index +1, and the last variable
  1238. having index -1. Variables are ordered alphanumerically.
  1239. All variables and functions can be escaped by doubling the sign,
  1240. like &dollar;&dollar;variable_name or @@function_name. To escape a variable
  1241. twice use &dollar;&dollar;&dollar;var_name. One escape is removed each time tintin
  1242. needs to substitute a variable or function.
  1243. </span><span style='color:#5F5'> Arguments
  1244. </span><span style='color:#FFF'>%0 - %99</span><span style='color:#AAA'> The percent sign followed by a number is used for arguments by the
  1245. following triggers:
  1246. alias, action, button, event, function, prompt, and substitute.
  1247. </span><span style='color:#FFF'>&amp;0 - &amp;99</span><span style='color:#AAA'> The ampersand sign followed by a number is used for arguments in the
  1248. regex and replace commands.
  1249. All trigger and command arguments can be escaped by doubling the
  1250. sign like %%1 or &amp;&amp;1. One escape is removed each time tintin
  1251. substitutes trigger or command arguments. To escape three times
  1252. triple the sign like %%%1, etc.
  1253. </span><span style='color:#5F5'> Colors
  1254. </span><span style='color:#FFF'>&lt;000&gt;</span><span style='color:#AAA'> Three alphanumeric characters encapsulated by the less- and greater-
  1255. than signs are used for 4 and 8 bit color codes.
  1256. </span><span style='color:#FFF'>&lt;0000&gt;</span><span style='color:#AAA'> Either a B (background) or F (foreground) followed by three
  1257. hexadecimal characters encapsulated by &lt; &gt; signs are used for 12
  1258. bit color codes. Requires truecolor capable terminal.
  1259. </span><span style='color:#FFF'>&lt;0000000&gt;</span><span style='color:#AAA'> Either a B (background) or F (foreground) followed by six
  1260. hexadecimal characters encapsulated by &lt; &gt; signs are used for 24
  1261. bit color codes. Requires truecolor capable terminal.
  1262. More information is available at #help color.
  1263. </span><span style='color:#5F5'> Escapes
  1264. </span><span style='color:#FFF'>&bsol; </span><span style='color:#AAA'> The back slash is used to escape a character. All available options
  1265. are listed at #help escape. Escapes are typically escaped when text
  1266. leaves the client, by being send to a server, the shell, being
  1267. displayed on the screen, or being processed as part of a regex.
  1268. Escapes try to mimic escapes in PCRE when possible.
  1269. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#ESCAPES'>escapes</a>, <a href='#INFO'>info</a> and <a href='#PCRE'>pcre</a>.
  1270. <a name='SUSPEND'></a>
  1271. </span><span style='color:#FF5'> SUSPEND
  1272. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #cursor suspend
  1273. Temporarily suspends tintin and returns you to your shell. To
  1274. return to tintin, type 'fg' at the shell prompt.
  1275. While suspended your tintin sessions will freeze. To keep a
  1276. suspended session running use the #daemon command.
  1277. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SESSIONNAME'>sessionname</a>
  1278. <a name='TIME'></a>
  1279. </span><span style='color:#FF5'> TIME
  1280. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>%t</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1281. The %t format specifier of the #format command allows printing dates
  1282. using the strftime() format specifiers. By default the time stamp used
  1283. is the current time, if you want to print a past or future date use:
  1284. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>%t</span><span style='color:#FFF'>} {{</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>epoch time</span><span style='color:#FFF'>}}</span><span style='color:#AAA'>
  1285. The current epoch time value is obtained using #format {time} {%T}.
  1286. When using %t the argument should contain strftime format specifiers.
  1287. The output may differ depending on your locale. See man strftime.
  1288. %a Abbreviated name of the day of the week (mon ... sun).
  1289. %A Full name of the day of the week. (Monday ... Sunday)
  1290. %b Abbreviated name of the month (Jan ... Dec)
  1291. %B Full name of the month. (January ... December)
  1292. %C 2 digit numeric century. (19 ... 20)
  1293. %d 2 digit numeric day of the month (01 ... 31)
  1294. %H 2 digit numeric 24-hour clock hour. (00 ... 23)
  1295. %I 2 digit numeric 12-hour clock hour. (01 ... 12)
  1296. %j 3 digit numeric day of the year (001 ... 366)
  1297. %m 2 digit numeric month of the year (01 ... 12)
  1298. %M 2 digit numeric minute of the hour (00 ... 59)
  1299. %p Abbreviated 12 hour clock period (AM ... PM)
  1300. %P Abbreviated 12 hour clock period (am ... pm)
  1301. %S 2 digit numeric second of the minute (00 ...59
  1302. %u 1 digit numeric day of the week (1 ... 7)
  1303. %U 2 digit numeric Sunday week of the year (00 ... 53
  1304. %w 1 digit numeric day of the week (0 ... 6)
  1305. %W 2 digit numeric Monday week of the year (00 ... 53
  1306. %y 2 digit numeric year. (70 ... 38)
  1307. %Y 4 digit numeric year. (1970 ... 2038)
  1308. %z 5 digit timezone offset. (-1200 ... +1400)
  1309. %Z Abbreviated name of the time zone. (CET, GMT, etc)
  1310. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#EVENT'>event</a> and <a href='#FORMAT'>format</a>.