tutorial.html 118 KB

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