tutorial.html 118 KB

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