help.html 178 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293
  1. <html>
  2. <head>
  3. <meta http-equiv='content-type' content='text/html; charset=utf-8'>
  4. <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  5. <meta name='description' content='Generated by TinTin++ 2.01.93b - http://tintin.sourceforge.net'>
  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. .d30{ color: #000; } .l30{ color: #555; } .b40{ background-color: #000; } .b50{ background-color: #555 }
  14. .d31{ color: #B00; } .l31{ color: #F55; } .b41{ background-color: #B00; } .b51{ background-color: #F55 }
  15. .d32{ color: #0B0; } .l32{ color: #5F5; } .b42{ background-color: #0B0; } .b52{ background-color: #5F5 }
  16. .d33{ color: #BB0; } .l33{ color: #FF5; } .b43{ background-color: #BB0; } .b53{ background-color: #FF5 }
  17. .d34{ color: #00B; } .l34{ color: #55F; } .b44{ background-color: #00B; } .b54{ background-color: #55F }
  18. .d35{ color: #B0B; } .l35{ color: #F5F; } .b45{ background-color: #B0B; } .b55{ background-color: #F5F }
  19. .d36{ color: #0BB; } .l36{ color: #5FF; } .b46{ background-color: #0BB; } .b56{ background-color: #5FF }
  20. .d37{ color: #BBB; } .l37{ color: #FFF; } .b47{ background-color: #BBB; } .b57{ background-color: #FFF }
  21. .d38{ color: #FFF; } .l38{ color: #FFF; } .b48{ background-color: #000; } .b58{ background-color: #000 }
  22. .d39{ color: #FFF; } .l39{ color: #FFF; } .b49{ background-color: #000; } .b59{ background-color: #000 }
  23. </style>
  24. <body bgcolor='#000000'>
  25. </head>
  26. <pre>
  27. <span class='b49'><span class='d39'>
  28. <a href='#ACTION'> ACTION</a> <a href='#ALIAS'> ALIAS</a> <a href='#ALL'> ALL</a> <a href='#BELL'> BELL</a>
  29. <a href='#BREAK'> BREAK</a> <a href='#BUFFER'> BUFFER</a> <a href='#BUTTON'> BUTTON</a> <a href='#CASE'> CASE</a>
  30. <a href='#CAT'> CAT</a> <a href='#CHARACTERS'> CHARACTERS</a> <a href='#CHAT'> CHAT</a> <a href='#CLASS'> CLASS</a>
  31. <a href='#COLORS'> COLORS</a> <a href='#COMMANDS'> COMMANDS</a> <a href='#COORDINATES'> COORDINATES</a> <a href='#CONFIG'> CONFIG</a>
  32. <a href='#CONTINUE'> CONTINUE</a> <a href='#CR'> CR</a> <a href='#CURSOR'> CURSOR</a> <a href='#DAEMON'> DAEMON</a>
  33. <a href='#DEBUG'> DEBUG</a> <a href='#DEFAULT'> DEFAULT</a> <a href='#DELAY'> DELAY</a> <a href='#DRAW'> DRAW</a>
  34. <a href='#ECHO'> ECHO</a> <a href='#ELSE'> ELSE</a> <a href='#ELSEIF'> ELSEIF</a> <a href='#END'> END</a>
  35. <a href='#ESCAPE CODES'> ESCAPE CODES</a> <a href='#EVENT'> EVENT</a> <a href='#FORALL'> FORALL</a> <a href='#FOREACH'> FOREACH</a>
  36. <a href='#FORMAT'> FORMAT</a> <a href='#FUNCTION'> FUNCTION</a> <a href='#GAG'> GAG</a> <a href='#GREETING'> GREETING</a>
  37. <a href='#GREP'> GREP</a> <a href='#HELP'> HELP</a> <a href='#HIGHLIGHT'> HIGHLIGHT</a> <a href='#HISTORY'> HISTORY</a>
  38. <a href='#IF'> IF</a> <a href='#IGNORE'> IGNORE</a> <a href='#INDEX'> INDEX</a> <a href='#INFO'> INFO</a>
  39. <a href='#KEYPAD'> KEYPAD</a> <a href='#KILL'> KILL</a> <a href='#LINE'> LINE</a> <a href='#LIST'> LIST</a>
  40. <a href='#LOCAL'> LOCAL</a> <a href='#LOG'> LOG</a> <a href='#LOOP'> LOOP</a> <a href='#MACRO'> MACRO</a>
  41. <a href='#MAP'> MAP</a> <a href='#MATH'> MATH</a> <a href='#MATHEMATICS'> MATHEMATICS</a> <a href='#MESSAGE'> MESSAGE</a>
  42. <a href='#METRIC SYSTEM'> METRIC SYSTEM</a> <a href='#MSDP'> MSDP</a> <a href='#NOP'> NOP</a> <a href='#PARSE'> PARSE</a>
  43. <a href='#PATH'> PATH</a> <a href='#PATHDIR'> PATHDIR</a> <a href='#PCRE'> PCRE</a> <a href='#PORT'> PORT</a>
  44. <a href='#PROMPT'> PROMPT</a> <a href='#READ'> READ</a> <a href='#REGEXP'> REGEXP</a> <a href='#REPEAT'> REPEAT</a>
  45. <a href='#REPLACE'> REPLACE</a> <a href='#RETURN'> RETURN</a> <a href='#RUN'> RUN</a> <a href='#SCAN'> SCAN</a>
  46. <a href='#SCREEN'> SCREEN</a> <a href='#SCREEN READER'> SCREEN READER</a> <a href='#SCRIPT'> SCRIPT</a> <a href='#SEND'> SEND</a>
  47. <a href='#SESSION'> SESSION</a> <a href='#SESSIONNAME'> SESSIONNAME</a> <a href='#SHOWME'> SHOWME</a> <a href='#SNOOP'> SNOOP</a>
  48. <a href='#SPEEDWALK'> SPEEDWALK</a> <a href='#SPLIT'> SPLIT</a> <a href='#SSL'> SSL</a> <a href='#STATEMENTS'> STATEMENTS</a>
  49. <a href='#SUBSTITUTE'> SUBSTITUTE</a> <a href='#SUSPEND'> SUSPEND</a> <a href='#SWITCH'> SWITCH</a> <a href='#SYSTEM'> SYSTEM</a>
  50. <a href='#TAB'> TAB</a> <a href='#TEXTIN'> TEXTIN</a> <a href='#TICKER'> TICKER</a> <a href='#TIME'> TIME</a>
  51. <a href='#VARIABLE'> VARIABLE</a> <a href='#WHILE'> WHILE</a> <a href='#WRITE'> WRITE</a> <a href='#ZAP'> ZAP</a>
  52. <a name='ACTION'></a>
  53. </span><span class='l32'> ACTION
  54. </span><span class='l37'>Command</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>message</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  55. The #action command can be used to respond with one or several
  56. commands to a specific message send by the server. The %1-%99
  57. variables are substituted from the message and can be used in the
  58. command part of the action.
  59. The priority part is optional and determines the priority of the
  60. action, it defaults to 5.
  61. If the message starts with a ~ color codes must be matched. You can
  62. enable #config {convert meta} on to display meta characters.
  63. For more information on pattern matching see the section on PCRE.
  64. </span><span class='l37'>Example</span><span class='d37'>: #action {%1 tells you '%2'} {tell %1 I'm afk.}
  65. Actions can be triggered by the showme command and certain system
  66. messages.
  67. Actions can be triggered by the #showme command. If you don't want a
  68. #showme to get triggered use: #line ignore #showme {text}
  69. Actions are ordered alphabetically and only one action can trigger at
  70. a time. To change the order you can assign a priority, which defaults
  71. to 5, with a lower number indicating a higher priority. The priority
  72. can be a floating point number.
  73. To remove action with %* as the message, use #unaction {%%*} or
  74. #unaction {%*}. Alternatively you could wrap the action inside a
  75. class, and kill that class when you no longer need the action.
  76. </span><span class='l37'>Comment</span><span class='d37'>: You can remove an action with the #unaction command.
  77. </span><span class='l37'>Related</span><span class='d37'>: pcre, gag, highlight, prompt and substitute.
  78. <a name='ALIAS'></a>
  79. </span><span class='l32'> ALIAS
  80. </span><span class='l37'>Command</span><span class='d37'>: #alias </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  81. The #alias command can be used to shorten up long or oftenly used
  82. commands. The %1-99 variables are substituted from the arguments when
  83. using an alias and represent the 1st till 99th word which can be used
  84. in the commands part of the alias. If %0 is used it will contain all
  85. arguments. The priority part is optional and determines the priority
  86. of the alias, it defaults to 5.
  87. </span><span class='l37'>Example</span><span class='d37'>: #alias {k} {kill %1;kick}
  88. Typing 'k orc' would result in attacking the orc followed by a kick.
  89. You can create multi-word aliases by using variables in the name
  90. section.
  91. </span><span class='l37'>Example</span><span class='d37'>: #alias {k %1 with %2} {draw %2;attack %1;slash %1 with %2;
  92. kick at %2;strike %1 with %2}
  93. Using the above alias you could type k blue smurf with battle axe
  94. To have an alias that matches all user input, use %* as the name.
  95. </span><span class='l37'>Example</span><span class='d37'>: #alias {%*} {#showme You wrote: %0}
  96. Aliases are ordered alphabetically and only one alias can trigger at
  97. a time. To change the order you can assign a priority, which defaults
  98. to 5, with a lower number indicating a higher priority. The priority
  99. can be a floating point number.
  100. To remove an alias with %* as the name, use #unalias {%%*} or #unalias
  101. {%*}. Alternatively you can wrap the alias inside a class, and kill
  102. that class when you no longer need the alias.
  103. For more information on pattern matching see the section on PCRE.
  104. </span><span class='l37'>Comment</span><span class='d37'>: You can remove an alias with the #unalias command.
  105. </span><span class='l37'>Related</span><span class='d37'>: cursor, history, keypad, macro, speedwalk and tab.
  106. <a name='ALL'></a>
  107. </span><span class='l32'> ALL
  108. </span><span class='l37'>Command</span><span class='d37'>: #all </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>}</span><span class='d37'>
  109. If you have multiple sessions in one terminal you can use #all to
  110. execute the command with all sessions, excluding the startup session.
  111. </span><span class='l37'>Example</span><span class='d37'>: #all quit
  112. Sends 'quit' to all sessions.
  113. </span><span class='l37'>Related</span><span class='d37'>: port, run, session, sessionname, snoop, ssl and zap.
  114. <a name='BELL'></a>
  115. </span><span class='l32'> BELL
  116. </span><span class='l37'>Command</span><span class='d37'>: #bell </span><span class='l37'>{</span><span class='d37'>flash</span><span class='l37'>|</span><span class='d37'>focus</span><span class='l37'>|</span><span class='d37'>margin</span><span class='l37'>|</span><span class='d37'>ring</span><span class='l37'>|</span><span class='d37'>volume</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  117. The #bell command without an argument will ring the terminal bell.
  118. </span><span class='l37'>Example</span><span class='d37'>: #action {Bubba tells you} {#bell}
  119. If you aren't watching the screen this could be useful if you don't
  120. want to miss out on a conversation with Bubba. Alternatively you can
  121. use #system to play a sound file.
  122. Some terminals will allow you to use VT100 Operating System Commands
  123. to change the terminal's bell behavior which can be used to flash the
  124. taskbar icon and or focus the window on receival of a bell.
  125. </span><span class='l37'>Example</span><span class='d37'>: #action {Bubba tells you} {#screen save title;#screen set title Tell!;
  126. #bell ring;#delay 10 #screen load title}
  127. The above example will save your window title, change the title to
  128. 'Tell!', ring the bell, next reset the window title after 10 seconds.
  129. It's possible to set the terminal to pop to the foreground upon
  130. ringing of the alarm bell.
  131. </span><span class='l37'>Example</span><span class='d37'>: #bell focus on;#bell ring;#bell focus off
  132. It's possible to adjust the alarm bell volume on some terminals.
  133. </span><span class='l37'>Example</span><span class='d37'>: #loop {1} {8} {cnt} {#line substitute variables
  134. #delay {&dollar;cnt} #showme {Volume &dollar;cnt: #bell volume &dollar;cnt;#bell}
  135. </span><span class='l37'>Related</span><span class='d37'>: screen
  136. <a name='BREAK'></a>
  137. </span><span class='l32'> BREAK
  138. </span><span class='l37'>Command</span><span class='d37'>: #break
  139. The break command can be used inside the #foreach, #loop, #parse,
  140. #while and #switch statements. When #break is found, tintin will stop
  141. executing the statement it is currently in and move on to the next.
  142. </span><span class='l37'>Example</span><span class='d37'>: #while {1} {#math cnt &dollar;cnt + 1;#if {&dollar;cnt == 20} {#break}}
  143. </span><span class='l37'>Related</span><span class='d37'>: statements
  144. <a name='BUFFER'></a>
  145. </span><span class='l32'> BUFFER
  146. </span><span class='l37'>Command</span><span class='d37'>: #buffer </span><span class='l37'>{</span><span class='d37'>home</span><span class='l37'>|</span><span class='d37'>up</span><span class='l37'>|</span><span class='d37'>down</span><span class='l37'>|</span><span class='d37'>end</span><span class='l37'>|</span><span class='d37'>lock</span><span class='l37'>|</span><span class='d37'>find</span><span class='l37'>|</span><span class='d37'>get</span><span class='l37'>|</span><span class='d37'>clear</span><span class='l37'>}</span><span class='d37'>
  147. The buffer command has various options to manipulate your scrollback
  148. buffer.
  149. </span><span class='l37'>#buffer {home}
  150. </span><span class='d37'>
  151. Moves you to the top of your scrollback buffer and displays the page.
  152. Enables scroll lock mode. Most useful when used in a #macro.
  153. </span><span class='l37'>#buffer {up} [lines]
  154. </span><span class='d37'>
  155. Moves your scrollback buffer up one page and displays the page.
  156. Enables scroll lock mode. Most useful when used in a #macro. You
  157. can use #buffer {up} {1} to move the scrollback buffer up 1 line.
  158. </span><span class='l37'>#buffer {down} [lines]
  159. </span><span class='d37'>
  160. Moves your scrollback buffer down one page and displays the page.
  161. Enables scroll lock mode unless at the end. Most useful when used in
  162. a #macro.
  163. </span><span class='l37'>#buffer {end}
  164. </span><span class='d37'>
  165. Moves you to the end of your scrollback buffer and displays the page.
  166. Disables scroll lock mode. Most useful when used in a #macro.
  167. </span><span class='l37'>#buffer {find} {[number]} {&lt;string&gt;}
  168. </span><span class='d37'>
  169. Moves the buffer to the given string which can contain a regular
  170. expression. Optionally you can provide the number of matches to skip,
  171. allowing you to jump further back in the buffer.
  172. </span><span class='l37'>#buffer {get} {&lt;variable&gt;} {&lt;lower bound&gt;} {[upper bound]}
  173. </span><span class='d37'>
  174. Allows you to store one or several lines from your scrollback buffer
  175. (including color codes) into a variable. The lower and upper bound
  176. must be between 1 and the size of the buffer. If the upper bound is
  177. omitted the given line is stored as a standard variable. If an upper
  178. bound is given the lines between the two bounds are stored as a list.
  179. </span><span class='l37'>#buffer {lock} {on|off}
  180. </span><span class='d37'>
  181. Toggles the lock on the scrollback buffer. When locked, newly incoming
  182. text won't be displayed, any command will disable the lock, though
  183. several buffer commands will re-enable the lock. When unlocking it'll
  184. move you to the end of your scrollback buffer and display the page.
  185. </span><span class='l37'>#buffer {write} {&lt;filename&gt;}
  186. </span><span class='d37'>
  187. Writes the scrollback buffer to the given file.
  188. </span><span class='l37'>Example</span><span class='d37'>: #macro {&bsol;e[F} {#buffer end}
  189. </span><span class='l37'>Related</span><span class='d37'>: echo, grep, macro, showme and screen.
  190. <a name='BUTTON'></a>
  191. </span><span class='l32'> BUTTON
  192. </span><span class='l37'>Command</span><span class='d37'>: #button </span><span class='l37'>{</span><span class='d37'>square</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  193. The #button command can be used to respond with one or several
  194. commands to a mouse click received within the specified square.
  195. The click coordinates are stored in %0-%3 and can be used in the
  196. command part of the button.
  197. The square part should exists of two coordinates defining the
  198. upper left and bottom right corner using row, col, row, col syntax.
  199. The square arguments should be separated by spaces, semi-colons or
  200. braces.
  201. By default the button is set to respond to a mouse button press, to
  202. respond to other button presses you must add a 5th argument to the
  203. square that defines the button press type. You can enable #info
  204. button on to see button events and their type as they happen.
  205. The priority part is optional and determines the priority of the
  206. button, it defaults to 5.
  207. You must enable #config {mouse tracking} on for buttons to work.
  208. This command draws no visible button, you'll have to do so separately
  209. if needed.
  210. </span><span class='l37'>Example</span><span class='d37'>: #button {1;1;2;2} {#showme You clicked the upper left corner.}
  211. Buttons are ordered alphabetically and only one button can trigger at
  212. a time. To change the order you can assign a priority, which defaults
  213. to 5, with a lower number indicating a higher priority. The priority
  214. can be a floating point number.
  215. </span><span class='l37'>Comment</span><span class='d37'>: To see button clicks trigger use #info button on.
  216. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a button with the #unbutton command.
  217. </span><span class='l37'>Related</span><span class='d37'>: delay, event and ticker.
  218. <a name='CASE'></a>
  219. </span><span class='l32'> CASE
  220. </span><span class='l37'>Command</span><span class='d37'>: #case </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>arguments</span><span class='l37'>}</span><span class='d37'>
  221. The case command must be used within the #switch command. When the
  222. conditional argument of the case command matches the conditional
  223. argument of the switch command the body of the case is executed.
  224. When comparing strings both the switch and case arguments must be
  225. surrounded in quotes.
  226. </span><span class='l37'>Example</span><span class='d37'>:
  227. #function {reverse_direction}
  228. {
  229. #switch {&quot;%1&quot;}
  230. {
  231. #case {&quot;north&quot;} {#return south};
  232. #case {&quot;east&quot;} {#return west};
  233. #case {&quot;south&quot;} {#return north};
  234. #case {&quot;west&quot;} {#return east};
  235. #case {&quot;up&quot;} {#return down};
  236. #case {&quot;down&quot;} {#return up}
  237. }
  238. }
  239. This function returns the reverse direction. @reverse_direction{north}
  240. would return south.
  241. </span><span class='l37'>Related</span><span class='d37'>: default, statements and switch.
  242. <a name='CAT'></a>
  243. </span><span class='l32'> CAT
  244. </span><span class='l37'>Command</span><span class='d37'>: #cat </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  245. The cat command will concatinate the argument to the given variable.
  246. </span><span class='l37'>Related</span><span class='d37'>: format, function, local, math, replace, script and variable.
  247. <a name='CHARACTERS'></a>
  248. </span><span class='l32'> CHARACTERS
  249. </span><span class='d37'>
  250. The following special characters are defined:
  251. # The hashtag is the default character for starting a command and is
  252. subsequently known as the command character or tintin character.
  253. When loading a command file the command character is set to the
  254. first character in the file. The character can also be redefined
  255. using #config.
  256. ; The semi-colon is used as the command separator and can be used to
  257. separate two commands. Multiple commands can be strung together as
  258. well. Trailing semi-colons are ignored when reading a script file
  259. as this is a common error.
  260. { } Curly brackets aka braces are used for separating multi word command
  261. arguments, nesting commands, and nesting variables. Braces cannot
  262. easily be escaped and must always be used in pairs.
  263. &quot; &quot; Quote characters are used for strings in the #math, #if, #switch,
  264. and #case commands. It is however suggested to use an extra
  265. set of braces { } to define strings.
  266. ! The exclamation sign is used to repeat commands, see #help history.
  267. The character can be redefined using #config.
  268. &bsol; An input line starting with a backslash is send verbatim if you are
  269. connected to a server. This character can be configured with
  270. #config.
  271. </span><span class='l37'>Related</span><span class='d37'>: colors, escape, mathematics and pcre.
  272. <a name='CHAT'></a>
  273. </span><span class='l32'> CHAT
  274. </span><span class='l37'>Command</span><span class='d37'>: #chat </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  275. #chat {init} {port} Initilizes a chat port.
  276. #chat {name} {name} Sets your chat name.
  277. #chat {message} {buddy|all} {text} Sends a chat message
  278. #chat {accept} {buddy} {boost} Accept a file transfer
  279. #chat {call} {address} {port} Connect to a buddy
  280. #chat {cancel} {buddy} Cancel a file transfer
  281. #chat {color} {color names} Set the default color
  282. #chat {decline} {buddy} Decline a file transfer
  283. #chat {dnd} Decline new connections
  284. #chat {download} {directory} Set your download directory
  285. #chat {emote} {buddy|all} {text} Send an emote message
  286. #chat {forward} {buddy} Forward all chat messages
  287. #chat {forwardall} {buddy} Forward all session output
  288. #chat {filestat} {buddy} Show file transfer data
  289. #chat {group} {buddy} {name} Assign a chat group
  290. #chat {ignore} {buddy} Ignores someone
  291. #chat {info} Displays your info
  292. #chat {ip} {address} Changes your IP address
  293. #chat {paste} {buddy|all} {text} Pastes a block of text
  294. #chat {peek} {buddy} Show one's public connections
  295. #chat {ping} {buddy} Display response time
  296. #chat {private} {buddy|all} Make a connection private
  297. #chat {public} {buddy|all} Make a connection public
  298. #chat {reply} {text} Reply to last private message
  299. #chat {request} {buddy} Request one's public connections
  300. #chat {send} {buddy|all} {text} Sends a raw data string
  301. #chat {sendfile} {buddy} {filename} Start a file transfer
  302. #chat {serve} {buddy} Forward all public chat messages
  303. #chat {uninitialize} Uninitialize the chat port.
  304. #chat {who} Show all connections
  305. #chat {zap} {buddy} Close a connection
  306. </span><span class='l37'>Related</span><span class='d37'>: port
  307. <a name='CLASS'></a>
  308. </span><span class='l32'> CLASS
  309. </span><span class='l37'>Command</span><span class='d37'>: #class </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>open</span><span class='l37'>|</span><span class='d37'>close</span><span class='l37'>|</span><span class='d37'>list</span><span class='l37'>|</span><span class='d37'>read</span><span class='l37'>|</span><span class='d37'>size</span><span class='l37'>|</span><span class='d37'>write</span><span class='l37'>|</span><span class='d37'>kill</span><span class='l37'>} {</span><span class='d37'>arg</span><span class='l37'>}</span><span class='d37'>
  310. </span><span class='l37'>#class {&lt;name&gt;} {open}
  311. </span><span class='d37'> Open a class, closing a previously opened class. All triggers
  312. added afterwards are assigned to this class.
  313. </span><span class='l37'>#class {&lt;name&gt;} {clear}
  314. </span><span class='d37'> Will delete all triggers associated with the given class.
  315. </span><span class='l37'>#class {&lt;name&gt;} {close}
  316. </span><span class='d37'> Close the given class, opening the last open class, if any.
  317. </span><span class='l37'>#class {&lt;name&gt;} {kill}
  318. </span><span class='d37'> Will clear, close, and remove the class.
  319. </span><span class='l37'>#class {&lt;name&gt;} {list}
  320. </span><span class='d37'> List all triggers associated with the given class.
  321. </span><span class='l37'>#class {&lt;name&gt;} {load}
  322. </span><span class='d37'> Will load the saved copy of the class from memory.
  323. </span><span class='l37'>#class {&lt;name&gt;} {read} {&lt;filename&gt;
  324. </span><span class='d37'> Will open the class, read the file, and close afterwards.
  325. </span><span class='l37'>#class {&lt;name&gt;} {save}
  326. </span><span class='d37'> Will save all triggers of the given class to memory.
  327. </span><span class='l37'>#class {&lt;name&gt;} {size} {&lt;variable&gt;}
  328. </span><span class='d37'> Will store the size of the class in a variable.
  329. </span><span class='l37'>#class {&lt;name&gt;} {write} {&lt;filename&gt;}
  330. </span><span class='d37'> Will write all triggers of the given class to file.
  331. The {kill} option will delete all triggers of the given class.
  332. Keep in mind that the kill and read option are very fast allowing
  333. them to be used to enable and disable classes.
  334. </span><span class='l37'>Example</span><span class='d37'>: #class extra kill;#class extra read extra.tin
  335. Deletes all triggers of 'extra' class if any. Read 'extra.tin' file,
  336. all triggers loaded will be assigned to the fresh new 'extra' class.
  337. </span><span class='l37'>Related</span><span class='d37'>: config, debug, ignore, info, kill, line and message.
  338. <a name='COLORS'></a>
  339. </span><span class='l32'> COLORS
  340. </span><span class='l37'>Syntax</span><span class='d37'>: &lt;xyz&gt; with x, y, z being parameters
  341. Parameter 'x': VT100 code
  342. 0 - Reset all colors and codes to default
  343. 1 - Bold
  344. 2 - Dim
  345. 4 - Underscore
  346. 5 - Blink
  347. 7 - Reverse
  348. 8 - Skip (use previous code)
  349. Parameter 'y': Foreground color
  350. Parameter 'z': Background color
  351. 0 - Black 5 - Magenta
  352. 1 - Red 6 - Cyan
  353. 2 - Green 7 - White
  354. 3 - Yellow 8 - Skip
  355. 4 - Blue 9 - Default
  356. For xterm 256 colors support use &lt;aaa&gt; to &lt;fff&gt; for RGB foreground
  357. colors and &lt;AAA&gt; to &lt;FFF&gt; for RGB background colors. For the grayscale
  358. foreground colors use &lt;g00&gt; to &lt;g23&gt;, for grayscale background colors
  359. use &lt;G00&gt; to &lt;G23&gt;.
  360. The tertiary colors are as follows:
  361. &lt;acf&gt; - Azure &lt;afc&gt; - Jade
  362. &lt;caf&gt; - Violet &lt;cfa&gt; - Lime
  363. &lt;fac&gt; - Pink &lt;fca&gt; - Orange
  364. </span><span class='l37'>Example</span><span class='d37'>: #showme &lt;acf&gt;Azure &lt;afc&gt;Jade &lt;caf&gt;Violet
  365. </span><span class='l37'>Example</span><span class='d37'>: #showme &lt;cfa&gt;Lime &lt;fac&gt;Pink &lt;fca&gt;Orange
  366. For 12 bit truecolor use &lt;F000&gt; to &lt;FFFF&gt; for foreground colors and
  367. &lt;B000&gt; to &lt;BFFF&gt; for background colors.
  368. For 24 bit truecolor use &lt;F000000&gt; to &lt;FFFFFFF&gt; for foreground
  369. colors and &lt;B000000&gt; to &lt;BFFFFFF&gt; for background colors.
  370. If the color code exceeds your configured color mode it will be
  371. downgraded to the closest match.
  372. </span><span class='l37'>Related</span><span class='d37'>: characters, coordinates, escape, mathematics and pcre.
  373. <a name='COMMANDS'></a>
  374. </span><span class='l32'> COMMANDS
  375. </span><span class='l37'>Command</span><span class='d37'>: #commands </span><span class='l37'>{</span><span class='d37'>regex</span><span class='l37'>}
  376. </span><span class='d37'>
  377. Shows all commands or all commands matching the given search
  378. string.
  379. </span><span class='l37'>Related</span><span class='d37'>: help, info and statements.
  380. <a name='COORDINATES'></a>
  381. </span><span class='l32'> COORDINATES
  382. </span><span class='d37'>
  383. When the 0,0 coordinate is in the upper left corner TinTin++ uses
  384. a y,x / rows,cols notation. When the 0,0 coordinate is in the
  385. bottom left corner tintin uses a x,y / cols/rows notation.
  386. When a square is defined this is done by specifying the upper left
  387. and bottom right corner of the square using four coordinates.
  388. The vast majority of tintin commands use row,col notation.
  389. </span><span class='l37'>Related</span><span class='d37'>: characters, colors, escape, mathematics and pcre.
  390. <a name='CONFIG'></a>
  391. </span><span class='l32'> CONFIG
  392. </span><span class='l37'>Command</span><span class='d37'>: #config </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  393. This allows you to configure various settings, the settings can be
  394. written to file with the #write command.
  395. If you configure the global session (the one you see as you start up
  396. tintin) all sessions started will inherite these settings.
  397. It's advised to make a configuration file to read on startup if you
  398. do not like the default settings.
  399. Config options which aren't listed by default:
  400. #CONFIG {BUFFER SIZE} {SIZE} Set the scrollback buffer size.
  401. #CONFIG {CHILD LOCK} {ON|OFF} Enable or disable command input.
  402. #CONFIG {CONVERT META} {ON|OFF} Shows color codes and key bindings.
  403. #CONFIG {DEBUG TELNET} {ON|OFF} Shows telnet negotiations y/n.
  404. #CONFIG {LOG LEVEL} {LOW|HIGH} LOW logs server output before triggers.
  405. #CONFIG {INHERITANCE} {ON|OFF} Session trigger inheritance y/n.
  406. #CONFIG {MCCP} {ON|OFF} Enable or disable MCCP support.
  407. #CONFIG {PID} {NUMBER} Set the PID of the master process.
  408. </span><span class='l37'>Related</span><span class='d37'>: class and line.
  409. <a name='CONTINUE'></a>
  410. </span><span class='l32'> CONTINUE
  411. </span><span class='l37'>Command</span><span class='d37'>: #continue
  412. The continue command can be used inside the #FOREACH, #LOOP, #PARSE,
  413. #WHILE and #SWITCH commands. When #CONTINUE is found, tintin will go
  414. to the end of the command and proceed as normal, which may be to
  415. reiterate the command.
  416. </span><span class='l37'>Example</span><span class='d37'>: #loop 1 10 cnt {#if {&dollar;cnt % 2 == 0} {#continue} {say &dollar;cnt}}
  417. </span><span class='l37'>Related</span><span class='d37'>: break, foreach, list, loop, parse, repeat, return and while.
  418. <a name='CR'></a>
  419. </span><span class='l32'> CR
  420. </span><span class='l37'>Command</span><span class='d37'>: #cr
  421. Sends a carriage return to the session. Useful for aliases that need
  422. extra carriage returns.
  423. This command is obsolete as you can accomplish the same using #send
  424. without an argument or #send {}.
  425. </span><span class='l37'>Related</span><span class='d37'>: forall
  426. <a name='CURSOR'></a>
  427. </span><span class='l32'> CURSOR
  428. </span><span class='l37'>Command</span><span class='d37'>: #cursor </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  429. Typing #cursor without an option will show all available cursor
  430. options, their default binding, and an explanation of their function.
  431. The cursor command's primarly goal is adding customizable input editing
  432. with macros. Subsequently many cursor commands only work properly when
  433. used within a macro or event.
  434. </span><span class='l37'>Related</span><span class='d37'>: alias, history, keypad, macro, speedwalk and tab.
  435. <a name='DAEMON'></a>
  436. </span><span class='l32'> DAEMON
  437. </span><span class='l37'>Command</span><span class='d37'>: #daemon </span><span class='l37'>{</span><span class='d37'>attach</span><span class='l37'>|</span><span class='d37'>detach</span><span class='l37'>|</span><span class='d37'>kill</span><span class='l37'>|</span><span class='d37'>list</span><span class='l37'>} [</span><span class='d37'>name</span><span class='l37'>]
  438. </span><span class='d37'>#daemon provides functionality similar to that of the screen and tmux
  439. utilities.
  440. </span><span class='l37'>#daemon attach [name]
  441. </span><span class='d37'> The attach option will try to find a daemonized tintin instance and
  442. take over control. The name argument is optional.
  443. </span><span class='l37'>#daemon detach [name]
  444. </span><span class='d37'> The detach option will daemonize tintin, turning it into a background
  445. process. The name argument is optional and is useful if you have
  446. several daemonized tt++ instances running so you can keep them apart.
  447. </span><span class='l37'>#daemon kill [name]
  448. </span><span class='d37'> Kills all daemons or daemons with matching name.
  449. </span><span class='l37'>#daemon list [name]
  450. </span><span class='d37'> List all daemons or daemons with matching name.
  451. </span><span class='l37'>Related</span><span class='d37'>: script, system and run.
  452. <a name='DEBUG'></a>
  453. </span><span class='l32'> DEBUG
  454. </span><span class='l37'>Command</span><span class='d37'>: #debug </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>|</span><span class='d37'>log</span><span class='l37'>}</span><span class='d37'>
  455. Toggles a list on or off. With no argument it shows your current
  456. settings, as well as the list names that you can debug.
  457. If you for example set ACTIONS to ON you will get debug information
  458. whenever an action is triggered.
  459. #debug {listname} {log} will silently write debugging information to
  460. the log file, you must be logging in order for this to work.
  461. Not every list has debug support yet.
  462. </span><span class='l37'>Related</span><span class='d37'>: class, ignore, info, kill and message.
  463. <a name='DEFAULT'></a>
  464. </span><span class='l32'> DEFAULT
  465. </span><span class='l37'>Command</span><span class='d37'>: #default </span><span class='l37'>{</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  466. The default command can only be used within the switch command. When
  467. the conditional argument of non of the case commands matches the switch
  468. command's conditional statement the default command is executed.
  469. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, elseif, if, switch and regex.
  470. <a name='DELAY'></a>
  471. </span><span class='l32'> DELAY
  472. </span><span class='l37'>Command</span><span class='d37'>: #delay </span><span class='l37'>{</span><span class='d37'>seconds</span><span class='l37'>} {</span><span class='d37'>command</span><span class='l37'>}</span><span class='d37'>
  473. </span><span class='l37'>Command</span><span class='d37'>: #delay </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>command</span><span class='l37'>} {</span><span class='d37'>seconds</span><span class='l37'>}</span><span class='d37'>
  474. Delay allows you to have tintin wait the given amount of seconds
  475. before executing the given command. tintin won't wait before
  476. executing following input commands if any.
  477. Floating point precision for milliseconds is possible.
  478. </span><span class='l37'>Example</span><span class='d37'>: #showme first;#delay {1} {#showme last}
  479. This will print 'first', and 'last' around one second later.
  480. </span><span class='l37'>Comment</span><span class='d37'>: If you want to remove a delay with the #undelay command you can add
  481. a name as the first argument, be aware this changes the syntax. If
  482. the name is a number keep in mind that delays with the same numeric
  483. name will not be overwritten
  484. </span><span class='l37'>Related</span><span class='d37'>: event and ticker.
  485. <a name='DRAW'></a>
  486. </span><span class='l32'> DRAW
  487. </span><span class='l37'>Command</span><span class='d37'>: #draw </span><span class='l37'>[</span><span class='d37'>color</span><span class='l37'>] [</span><span class='d37'>options</span><span class='l37'>] &lt;</span><span class='d37'>type</span><span class='l37'>&gt; &lt;</span><span class='d37'>square</span><span class='l37'>&gt; {</span><span class='d37'>text</span><span class='l37'>}
  488. </span><span class='d37'>
  489. The draw commands allows you to draw various types of lines and shapes
  490. on the screen. Common options and types with a brief description are
  491. provided when you type #draw without an argument.
  492. The square arguments should exists of two coordinates defining the
  493. upper left and bottom right corner using row, col, row, col syntax.
  494. You can prefix the option with a color code or color name to color the
  495. lines and shapes.
  496. You can further prefix the option as following:
  497. ASCII will draw in ASCII mode.
  498. BLANKED will blank the lines and corners.
  499. BOTTOM will draw on the bottom side if possible.
  500. BUMPED will precede the draw with an enter.
  501. CIRCLED will circle the corners.
  502. CONVERT will draw text with meta conversion.
  503. CROSSED will cross the corners.
  504. FILLED will fill circles and jewels.
  505. GRID will draw TABLE as a grid.
  506. HORIZONTAL will draw horizontal if possible.
  507. HUGE will draw text in huge letters.
  508. JEWELED will diamond the corners.
  509. JOINTED will draw corners.
  510. LEFT will draw on the left side if possible.
  511. NUMBERED will draw numbered, mostly for debugging.
  512. PRUNED will prune the corners.
  513. RIGHT will draw on the right side if possible.
  514. ROUNDED will round the corners.
  515. SHADOWED will shadow HUGE text.
  516. TEED will tee the corners.
  517. TRACED will trace HUGE text.
  518. TOP will draw on the top side if possible.
  519. TUBED will draw tubes instead of lines.
  520. UNICODE will draw in unicode mode.
  521. VERTICAL will draw vertical if possible.
  522. The following types are available.
  523. </span><span class='l37'>[ASCII|UNICODE|HUGE] BOX {[TEXT1]} {[TEXT2]}
  524. </span><span class='d37'> will draw a box.
  525. </span><span class='l37'>[BLANKED|CIRCLED|CROSSED|JEWELED|ROUNDED|TEED|PRUNED] CORNER
  526. </span><span class='d37'> will draw a corner.
  527. </span><span class='l37'>[BLANKED|HORIZONTAL|NUMBERED|TUBED|VERTICAL] LINE {[TEXT]}
  528. </span><span class='d37'> will draw a line.
  529. </span><span class='l37'>RAIN {&lt;VARIABLE&gt;} {[SPAWN]} {[FADE]} {[LEGEND]}
  530. </span><span class='d37'> will draw digital rain.
  531. </span><span class='l37'>[JOINTED|TOP|LEFT|BOTTOM|RIGHT] SIDE
  532. </span><span class='d37'> will draw one or more sides of a box.
  533. </span><span class='l37'>[GRID] TABLE {[LIST1]} {[LIST2]}
  534. </span><span class='d37'> will draw a table.
  535. </span><span class='l37'>[HUGE] TILE {[TEXT1]} {[TEXT2]}
  536. </span><span class='d37'> will draw a tile
  537. All draw types take an optional text argument as long as a valid
  538. square with enough space has been defined. Text is automatically
  539. word wrapped.
  540. </span><span class='l37'>Example</span><span class='d37'>: #draw Blue box 1 1 3 20 {Hello world!}
  541. </span><span class='l37'>Related</span><span class='d37'>: buffer, echo, grep and showme.
  542. <a name='ECHO'></a>
  543. </span><span class='l32'> ECHO
  544. </span><span class='l37'>Command</span><span class='d37'>: #echo </span><span class='l37'>{</span><span class='d37'>format</span><span class='l37'>} {</span><span class='d37'>argument1</span><span class='l37'>} {</span><span class='d37'>argument2</span><span class='l37'>} {</span><span class='d37'>etc</span><span class='l37'>}</span><span class='d37'>
  545. Echo command displays text on the screen with formatting options. See
  546. the help file for the format command for more information.
  547. The echo command does not trigger actions.
  548. As with the #showme command you can split the {format} argument up into
  549. two braced arguments, in which case the 2nd argument is the row number.
  550. </span><span class='l37'>Example</span><span class='d37'>: #echo {The current date is %t.} {%Y-%m-%d %H:%M:%S}
  551. #echo {[%38s][%-38s]} {Hello World} {Hello World}
  552. #echo {{this is %s on the top row} {-1}} {printed}
  553. </span><span class='l37'>Related</span><span class='d37'>: buffer, format, grep and showme.
  554. <a name='ELSE'></a>
  555. </span><span class='l32'> ELSE
  556. </span><span class='l37'>Command</span><span class='d37'>: #else </span><span class='l37'>{</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  557. The else statement should follow an #IF or #ELSEIF statement and is
  558. only called if the proceeding #IF or #ELSEIF is false.
  559. </span><span class='l37'>Example</span><span class='d37'>: #if {1d2 == 1} {smile};#else {grin}
  560. </span><span class='l37'>Related</span><span class='d37'>: case, default, elseif, if, switch and regex.
  561. <a name='ELSEIF'></a>
  562. </span><span class='l32'> ELSEIF
  563. </span><span class='l37'>Command</span><span class='d37'>: #elseif </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  564. The elseif statement should follow an #IF or #ELSEIF statement and is
  565. only called when the statement is true and the proceeding #IF and
  566. #ELSEIF statements are false.
  567. </span><span class='l37'>Example</span><span class='d37'>: #if {1d3 == 1} {smirk};#elseif {1d2 == 1} {snicker}
  568. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, if, switch and regex.
  569. <a name='END'></a>
  570. </span><span class='l32'> END
  571. </span><span class='l37'>Command</span><span class='d37'>: #end {&lt;message&gt;}
  572. Terminates tintin and return to unix. On most systems, ctrl-c has
  573. the same result.
  574. The message is optional and is printed before tintin exits. When
  575. using #end {&bsol;} tintin will terminate silently.
  576. </span><span class='l37'>Related</span><span class='d37'>: zap
  577. <a name='ESCAPE CODES'></a>
  578. </span><span class='l32'> ESCAPE CODES
  579. </span><span class='d37'> You may use the escape character &bsol; for various special characters.
  580. &bsol;a beep the terminal.
  581. &bsol;c send a control character, &bsol;ca for ctrl-a.
  582. &bsol;e start an escape sequence.
  583. &bsol;n send a line feed.
  584. &bsol;r send a carriage return.
  585. &bsol;t send a horizontal tab.
  586. &bsol;x print an 8 bit character using hexadecimal, &bsol;xFF for example.
  587. &bsol;x7B send the '{' character.
  588. &bsol;x7D send the '}' character.
  589. &bsol;u print a 16 bit unicode character, &bsol;uFFFD for example.
  590. &bsol;U print a 21 bit unicode character, &bsol;U02AF21 for example.
  591. &bsol;v send a vertical tab
  592. Ending a line with &bsol; will stop tintin from appending a line feed.
  593. To escape arguments in an alias or action use %%0 %%1 %%2 etc.
  594. </span><span class='l37'>Related</span><span class='d37'>: characters, colors, coordinates, mathematics and pcre.
  595. <a name='EVENT'></a>
  596. </span><span class='l32'> EVENT
  597. </span><span class='l37'>Command</span><span class='d37'>: #event </span><span class='l37'>{</span><span class='d37'>event type</span><span class='l37'>}</span><span class='d37'>
  598. Events allow you to create triggers for predetermined client events.
  599. Use #event without an argument to see a list of possible events with
  600. a brief description. Use #event %* to see the current list of defined
  601. events. Use #info {events} {on} to see events get thrown.
  602. Some events can be prefixed with CATCH to interrupt default behavior.
  603. CATCH &lt;EVENT&gt;
  604. CHAT MESSAGE %0 default %1 plain
  605. CLASS ACTIVATED %0 class name
  606. CLASS DEACTIVATED %0 class name
  607. DATE %1 month - %3 day %4 hour : %5 minute
  608. DAY &lt;DAY&gt; %3 day of the month
  609. DOUBLE-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  610. END OF PATH
  611. HOUR %4 hour
  612. IAC &lt;VAR&gt; &lt;VAR&gt;
  613. IAC SB GMCP &lt;MODULE&gt; %0 data %1 raw data
  614. IAC SB MSSP %0 variable %1 value
  615. IAC SB MSDP %0 variable %1 value %2 plain value
  616. IAC SB MSDP &lt;VAR&gt; %0 variable %1 value %2 plain value
  617. IAC SB NEW-ENVIRON %0 variable %1 value
  618. IAC SB ZMP &lt;VAR&gt; %0 value
  619. IAC SB &lt;VAR&gt; %0 raw text %1 raw data
  620. LONG-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  621. MAP ENTER MAP %0 new vnum
  622. MAP ENTER ROOM %0 new vnum %1 old vnum
  623. MAP ENTER ROOM &lt;VAR&gt; %0 new vnum %1 old vnum
  624. MAP EXIT MAP %0 old vnum
  625. MAP EXIT ROOM %0 old vnum %1 new vnum
  626. MAP EXIT ROOM &lt;VAR&gt; %0 old vnum %1 new vnum
  627. MAP FOLLOW MAP %0 old vnum %1 new vnum %2 exit name
  628. MAP MOUSE LOCATION %0 vnum %1 location
  629. MAP UPDATED VTMAP
  630. MINUTE %5 minute
  631. MONTH %1 month
  632. MOVED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  633. PORT CONNECTION %0 name %1 ip %2 port
  634. PORT DISCONNECTION %0 name %1 ip %2 port
  635. PORT MESSAGE %0 data %1 plain data
  636. PORT LOG MESSAGE %0 name %1 ip %2 port %3 data %4 plain data
  637. PORT RECEIVED MESSAGE %0 name %1 ip %2 port %3 data %4 plain data
  638. PRESSED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  639. PROGRAM START %0 startup arguments
  640. PROGRAM TERMINATION %0 goodbye message
  641. READ ERROR %0 filename %1 error message
  642. RECEIVED INPUT %0 raw text
  643. RECEIVED KEYPRESS %0 raw text %1 unicode index
  644. RECEIVED LINE %0 raw text %1 plain text
  645. RECEIVED OUTPUT %0 raw text
  646. RECEIVED PROMPT %0 raw text %1 plain text
  647. RELEASED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  648. SCAN CSV HEADER %0 all args %1 arg1 %2 arg2 .. %99 arg99
  649. SCAN CSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
  650. SCAN TSV HEADER %0 all args %1 arg1 %2 arg3 .. %99 arg99
  651. SCAN TSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
  652. SCREEN FOCUS %0 focus (0 or 1)
  653. SCREEN LOCATION %0 rows %1 cols %2 height %3 width
  654. SCREEN MOUSE LOCATION %0-3 screen row/col %4-7 cell row/col %8 loc
  655. SCREEN RESIZE %0 rows %1 cols %2 height %3 width
  656. SCREEN SPLIT %0 top row %1 top col %2 bot row %3 bot col
  657. SCREEN UNSPLIT %0 top row %1 top col %2 bot row %3 bot col
  658. SCROLLED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  659. SECOND %6 second
  660. SEND OUTPUT %0 raw text %1 size
  661. SENT OUTPUT %0 raw text %1 size
  662. SESSION ACTIVATED %0 name
  663. SESSION CONNECTED %0 name %1 host %2 ip %3 port
  664. SESSION CREATED %0 name %1 host %2 ip %3 port
  665. SESSION DEACTIVATED %0 name
  666. SESSION DISCONNECTED %0 name %1 host %2 ip %3 port
  667. SESSION TIMED OUT %0 name %1 host %2 ip %3 port
  668. SHORT-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  669. SWIPED &lt;DIR&gt;
  670. %0 dir %1 button %2 row %3 col %4 -row %5 -col %6 row %7 col %8 -row
  671. %9 -col %10 rows %11 cols
  672. SYSTEM ERROR %0 name %1 system msg %2 error %3 error msg
  673. TIME %4 hour : %5 minute : %6 second
  674. TRIPLE-CLICKED &lt;VAR&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  675. UNKNOWN COMMAND %0 raw text
  676. VARIABLE UPDATE &lt;VAR&gt; %0 name %1 new value
  677. VARIABLE UPDATED &lt;VAR&gt; %0 name %1 new value
  678. VT100 SCROLL REGION %0 top row %1 bot row %2 rows %3 cols %4 wrap
  679. WEEK &lt;DAY&gt; %2 day of the week
  680. WRITE ERROR %0 filename %1 error message
  681. YEAR %0 year
  682. To see all events trigger use #event info on. Since this can quite
  683. spammy it's possible to gag event info messages.
  684. </span><span class='l37'>Example</span><span class='d37'>: #event {SESSION CONNECTED} {#read mychar.tin}
  685. </span><span class='l37'>Comment</span><span class='d37'>: You can remove an event with the #unevent command.
  686. </span><span class='l37'>Related</span><span class='d37'>: button, delay and ticker.
  687. <a name='FORALL'></a>
  688. </span><span class='l32'> FORALL
  689. </span><span class='l37'>This command is obsolete, please use foreach instead.
  690. Related</span><span class='d37'>: foreach
  691. <a name='FOREACH'></a>
  692. </span><span class='l32'> FOREACH
  693. </span><span class='l37'>Command</span><span class='d37'>: #foreach </span><span class='l37'>{</span><span class='d37'>list</span><span class='l37'>} {</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  694. For each item in the provided list the foreach statement will update
  695. the given variable and execute the command part of the statement. List
  696. elements must be separated by braces or semicolons.
  697. </span><span class='l37'>Example</span><span class='d37'>: #foreach {bob;tim;kim} {name} {tell &dollar;name Hello}
  698. </span><span class='l37'>Example</span><span class='d37'>: #foreach {{bob}{tim}{kim}} {name} {tell &dollar;name Hello}
  699. </span><span class='l37'>Related</span><span class='d37'>: break, continue, list, loop, parse, repeat, return and while.
  700. <a name='FORMAT'></a>
  701. </span><span class='l32'> FORMAT
  702. </span><span class='l37'>Command</span><span class='d37'>: #format </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>format</span><span class='l37'>} {</span><span class='d37'>argument1</span><span class='l37'>} {</span><span class='d37'>argument2</span><span class='l37'>} {</span><span class='d37'>etc</span><span class='l37'>}</span><span class='d37'>
  703. Allows you to store a string into a variable in the exact same way
  704. C's sprintf works with a few enhancements and limitations such as
  705. no integer operations and a maximum of 30 arguments.
  706. If you use #format inside an alias or action you must escape %1s as
  707. %+1s or %%1s or %&bsol;1s so the %1 isn't substituted by the trigger.
  708. #format {test} {%+9s} {string} pad string with up to 9 spaces
  709. #format {test} {%-9s} {string} post pad string with up to 9 spaces
  710. #format {test} {%.8s} {string} copy at most 8 characters
  711. #format {test} {%a} {number} print corresponding charset character
  712. #format {test} {%c} {string} use a highlight color name
  713. #format {test} {%d} {number} print a number with integer formatting
  714. #format {test} {%f} {string} perform floating point math
  715. #format {test} {%g} {number} perform thousand grouping on {number}
  716. #format {test} {%h} {string} turn text into a header line
  717. #format {test} {%l} {string} lowercase text
  718. #format {test} {%m} {string} perform mathematical calculation
  719. #format {test} {%n} {name} capitalize the first letter
  720. #format {test} {%p} {string} strip leading and trailing spaces
  721. #format {test} {%r} {string} reverse text, hiya = ayih
  722. #format {test} {%s} {string} print given string
  723. #format {test} {%t} {format} display time with strftime format
  724. optional {{format}{time}} syntax
  725. #format {test} {%u} {string} uppercase text
  726. #format {list} {%w} {string} store word wrapped text in {list}
  727. optional {{string}{width}} syntax
  728. #format {test} {%x} {hex} print corresponding charset character
  729. #format {test} {%A} {char} store corresponding character value
  730. #format {test} {%C} {number} store number in chronological notation
  731. #format {test} {%D} {hex} convert hex to decimal in {test}
  732. #format {hash} {%H} {string} store a 64 bit string hash in {hash}
  733. #format {test} {%L} {string} store the string length in {test}
  734. #format {test} {%M} {number} convert number to metric in {test}
  735. #format {test} {%S} {string} store the number of spelling errors
  736. #format {time} {%T} {} store the epoch time in {time}
  737. #format {time} {%U} {} store the micro epoch time in {time}
  738. #format {test} {%X} {dec} convert dec to hexadecimal in {test}
  739. #format {test} {%%} a literal % character
  740. </span><span class='l37'>Comment</span><span class='d37'>: See #help TIME for help on the %t argument.
  741. </span><span class='l37'>Related</span><span class='d37'>: cat, echo, function, local, math, replace, script, time and variable.
  742. <a name='FUNCTION'></a>
  743. </span><span class='l32'> FUNCTION
  744. </span><span class='l37'>Command</span><span class='d37'>: #function </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>operation</span><span class='l37'>}</span><span class='d37'>
  745. Functions allow you to execute a script within a line of text, and
  746. replace the function call with the line of text generated by the
  747. function.
  748. Be aware that each function should set the &dollar;result variable at the
  749. end of the function, or call #return with the given result.
  750. To use a function use the @ character before the function name.
  751. The function arguments should be placed between braces behind the
  752. function name with argument separated by semicolons.
  753. The function itself can use the provided arguments which are stored
  754. in %1 to %9, with %0 holding all arguments.
  755. </span><span class='l37'>Example</span><span class='d37'>: #function {rnd} {#math {result} {1 d (%2 - %1 + 1) + %1 - 1}}
  756. #showme A random number between 100 and 200: @rnd{100;200}
  757. </span><span class='l37'>Example</span><span class='d37'>: #function gettime {#format result %t %H:%M}
  758. #showme The current time is @gettime{}
  759. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a function with the #unfunction command.
  760. </span><span class='l37'>Related</span><span class='d37'>: format, local, math, replace, script and variable.
  761. <a name='GAG'></a>
  762. </span><span class='l32'> GAG
  763. </span><span class='l37'>Command</span><span class='d37'>: #gag </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>}</span><span class='d37'>
  764. Removes any line that contains the string.
  765. </span><span class='l37'>Comment</span><span class='d37'>: See '#help action', for more information about triggers.
  766. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a gag with the #ungag command.
  767. </span><span class='l37'>Related</span><span class='d37'>: action, highlight, prompt and substitute.
  768. <a name='GREETING'></a>
  769. </span><span class='l32'> GREETING
  770. </span><span class='d36'> ####################################################################
  771. #</span><span class='d37'> </span><span class='d36'>#
  772. #</span><span class='d37'> T I N T I N + + 2.01.93b </span><span class='d36'>#
  773. #</span><span class='d37'> </span><span class='d36'>#
  774. #</span><span class='d37'> Code by Peter Unold, Bill Reis, and Igor van den Hoven </span><span class='d36'>#
  775. #</span><span class='d37'> </span><span class='d36'>#
  776. ####################################################################
  777. <a name='GREP'></a>
  778. </span><span class='l32'> GREP
  779. </span><span class='l37'>Command</span><span class='d37'>: #grep </span><span class='l37'>[</span><span class='d37'>page</span><span class='l37'>] {</span><span class='d37'>search string</span><span class='l37'>}</span><span class='d37'>
  780. This command allows you to search for matching lines in your scroll
  781. back buffer. The amount of matches shown equals your screen size. If
  782. you want to search back further use the optional page number. You can
  783. use wildcards for better search results. Be aware the search string
  784. is case sensitive, which can be disabled by using %i.
  785. By default grep searches from the end of the scrollback buffer to the
  786. beginning, this can be reversed by using a negative page number.
  787. </span><span class='l37'>Example</span><span class='d37'>: #grep Bubba tells you
  788. This will show all occasions where bubba tells you something.
  789. </span><span class='l37'>Related</span><span class='d37'>: buffer, echo and showme.
  790. <a name='HELP'></a>
  791. </span><span class='l32'> HELP
  792. </span><span class='l37'>Command</span><span class='d37'>: #help </span><span class='l37'>{</span><span class='d37'>subject</span><span class='l37'>}</span><span class='d37'>
  793. Without an argument #help will list all available help subjects.
  794. Using #help %* will display all help entries.
  795. </span><span class='l37'>Related</span><span class='d37'>: commands, debug, ignore, info, message and statements.
  796. <a name='HIGHLIGHT'></a>
  797. </span><span class='l32'> HIGHLIGHT
  798. </span><span class='l37'>Command</span><span class='d37'>: #highlight </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>color names</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  799. The highlight command is used to allow you to highlight strings of text.
  800. Available color options are:
  801. reset - resets the color state to default
  802. light - turns the color light in 16 color mode.
  803. dark - turns the color dark in 16 color mode.
  804. underscore - underscores the text.
  805. blink - makes the text blink.
  806. reverse - reverse foreground and background color.
  807. b - makes next color the background color.
  808. Available color names are:
  809. &lt;F06B&gt; - azure &lt;F08F&gt; - Azure
  810. &lt;F00B&gt; - blue &lt;F00F&gt; - Blue
  811. &lt;F0BB&gt; - cyan &lt;F0FF&gt; - Cyan
  812. &lt;F000&gt; - ebony &lt;F666&gt; - Ebony
  813. &lt;F0B0&gt; - green &lt;F0F0&gt; - Green
  814. &lt;F0B6&gt; - jade &lt;F0F8&gt; - Jade
  815. &lt;F6B0&gt; - lime &lt;F8F0&gt; - Lime
  816. &lt;FB0B&gt; - magenta &lt;FF0F&gt; - Magenta
  817. &lt;FB60&gt; - orange &lt;FF80&gt; - Orange
  818. &lt;FB06&gt; - pink &lt;FF08&gt; - Pink
  819. &lt;FB00&gt; - red &lt;FF00&gt; - Red
  820. &lt;F888&gt; - silver &lt;FDDD&gt; - Silver
  821. &lt;F860&gt; - tan &lt;FDB0&gt; - Tan
  822. &lt;F60B&gt; - violet &lt;F80F&gt; - Violet
  823. &lt;FBBB&gt; - white &lt;FFFF&gt; - White
  824. &lt;FBB0&gt; - yellow &lt;FFF0&gt; - Yellow
  825. The %1-99 variables can be used as 'wildcards' that will match with any
  826. text. They are useful for highlighting a complete line. The %0 variable
  827. should never be used in highlights.
  828. You may start the string to highlight with a ^ to only highlight text
  829. if it begins the line.
  830. Besides color names also &lt;abc&gt; color codes can be used.
  831. </span><span class='l37'>Example</span><span class='d37'>: #high {Valgar} {reverse blink}
  832. Prints every occurrence of 'Valgar' in blinking reverse video.
  833. </span><span class='l37'>Example</span><span class='d37'>: #high {^You %1} {bold cyan}
  834. Boldfaces any line that starts with 'You' in cyan.
  835. </span><span class='l37'>Example</span><span class='d37'>: #high {Bubba} {red underscore b green}
  836. Highlights the name Bubba as red underscored text on green background.
  837. </span><span class='l37'>Comment</span><span class='d37'>: See '#help action', for more information about triggers.
  838. </span><span class='l37'>Comment</span><span class='d37'>: See '#help substitute', for more advanced color substitution.
  839. </span><span class='l37'>Comment</span><span class='d37'>: This command only works with ANSI/VT100 terminals or emulators.
  840. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a highlight with the #unhighlight command.
  841. </span><span class='l37'>Related</span><span class='d37'>: action, gag, prompt and substitute.
  842. <a name='HISTORY'></a>
  843. </span><span class='l32'> HISTORY
  844. </span><span class='l37'>Command</span><span class='d37'>: #history </span><span class='l37'>{</span><span class='d37'>delete</span><span class='l37'>}</span><span class='d37'> Delete the last command.
  845. #history </span><span class='l37'>{</span><span class='d37'>insert</span><span class='l37'>} {</span><span class='d37'>command</span><span class='l37'>}</span><span class='d37'> Insert a command.
  846. #history </span><span class='l37'>{</span><span class='d37'>list</span><span class='l37'>}</span><span class='d37'> Display the entire command history.
  847. #history </span><span class='l37'>{</span><span class='d37'>read</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'> Read a command history from file.
  848. #history </span><span class='l37'>{</span><span class='d37'>write</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'> Write a command history to file.
  849. Without an argument all available options are shown.
  850. By default all commands are saved to the history list and the history
  851. list is saved between sessions in the ~/.tintin/history.txt file.
  852. You can set the character to repeat a command in the history with the
  853. #config {REPEAT CHAR} {&lt;character&gt;} configuration option, by default
  854. this is set to the exclamation mark.
  855. You can use ! by itself to repeat the last command, or !&lt;text&gt; to
  856. repeat the last command starting with the given text.
  857. You can use #config {REPEAT ENTER} {ON} to repeat the last command
  858. when you press enter on an empty line.
  859. You can press ctrl-r to enter an interactive regex enabled history
  860. search mode, or by issuing #cursor {history search}.
  861. TinTin++ tries to bind the arrow up and down keys to scroll through
  862. the history list by default. You can bind these with a macro yourself
  863. using #cursor {history next} and #cursor {history prev}. Many #cursor
  864. commands only work properly when bound with a macro.
  865. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, keypad, macro, speedwalk and tab.
  866. <a name='IF'></a>
  867. </span><span class='l32'> IF
  868. </span><span class='l37'>Command</span><span class='d37'>: #if </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>commands if true</span><span class='l37'>} {</span><span class='d37'>commands if false</span><span class='l37'>}</span><span class='d37'>
  869. The 'if' command is one of the most powerful commands added since
  870. TINTIN III. It works similar to an 'if' statement in other languages,
  871. and is strictly based on the way C handles its conditional statements.
  872. When an 'if' command is encountered, the conditional statement is
  873. evaluated, and if TRUE (any non-zero result) the commands are executed.
  874. The 'if' statement is only evaluated if it is read, so you must nest
  875. the 'if' statement inside another statement (most likely an 'action'
  876. command). The conditional is evaluated exactly the same as in the
  877. 'math' command only instead of storing the result, the result is used
  878. to determine whether to execute the commands.
  879. </span><span class='l37'>Example</span><span class='d37'>: #action {%0 gives you %1 gold coins.} {#if {%1&gt;5000} {thank %0}}
  880. If someone gives you more than 5000 coins, thank them.
  881. </span><span class='l37'>Comment</span><span class='d37'>: See '#help math', for more information.
  882. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, elseif, switch and regex.
  883. <a name='IGNORE'></a>
  884. </span><span class='l32'> IGNORE
  885. </span><span class='l37'>Command</span><span class='d37'>: #ignore </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>}</span><span class='d37'>
  886. Toggles a list on or off. With no arguments it shows your current
  887. settings, as well as the list names that you can ignore.
  888. If you for example set ACTIONS to OFF actions will no longer trigger.
  889. Not every list can be ignored.
  890. </span><span class='l37'>Related</span><span class='d37'>: class, debug, info, kill and message.
  891. <a name='INDEX'></a>
  892. </span><span class='l32'> INDEX
  893. </span><span class='d37'> On this page you'll find an introduction to using TinTin++. Additional
  894. information can be found in the individual help sections.
  895. </span><span class='l32'>
  896. Starting and Ending
  897. </span><span class='d37'>
  898. The syntax for starting TinTin++ is: ./tt++ [command file]
  899. Read more about the command file in the files section below. Remember
  900. one thing though. All actions, aliases, substitutions, etc, defined
  901. when starting up TinTin++ are inherited by all sessions.
  902. If you want to exit TinTin++ type '#end' or press ctrl-d on an empty
  903. line.
  904. For the WinTin++ users, if you want to paste text use shift-insert,
  905. text is automatically copied upon selection. This is typical Linux
  906. behavior, but it can take some getting used to.
  907. </span><span class='l32'>
  908. Basic features
  909. </span><span class='d37'>
  910. I'll start by explaining some of the very basic and important features:
  911. All TinTin++ commands starts with a '#'.
  912. </span><span class='l37'>Example</span><span class='d37'>: #help -- #help is a client command, and isn't send to the
  913. server.
  914. All TinTin++ commands can be abbreviated when typed.
  915. #he -- Typing #he is the same as typing #help though it's suggested to
  916. use at least 3 letter abbreviations just in case another command is
  917. added that starts with 'he'.
  918. All commands can be separated with a ';'.
  919. n;l green;s;say Dan Dare is back! -- do these 4 commands
  920. There are 3 ways ';'s can be overruled.
  921. &bsol;say Hello ;) -- Lines starting with a '&bsol;' aren't parsed by TinTin++.
  922. say Hello &bsol;;) -- The escape character can escape 1 letter.
  923. #config verbatim on -- Everything is send as is except '#' commands.
  924. </span><span class='l32'>
  925. Connecting to a server
  926. </span><span class='l37'>
  927. Command</span><span class='d37'>: #session </span><span class='l37'>{</span><span class='d37'>session name</span><span class='l37'>} {</span><span class='d37'>server address</span><span class='l37'>} {</span><span class='d37'>port</span><span class='l37'>}</span><span class='d37'>
  928. Example: #session someone tintin.sourceforge.net 4321
  929. You can have more than one session, in which case you can switch
  930. between sessions typing #&lt;session name&gt;.
  931. You can get a list of all sessions by typing: #session. The current
  932. active session is marked with (active). Snooped sessions with
  933. (snooped). MCCP sessions (compression) with (mccp 2) and (mccp 3).
  934. </span><span class='l32'>
  935. Split
  936. </span><span class='l37'>
  937. Command</span><span class='d37'>: #split
  938. The split command will create a separated input and output area.
  939. Using the #prompt command you can capture the prompt and place it on
  940. the split line. To get rid of the split interface you can use #unsplit
  941. which will restore the terminal settings to default.
  942. </span><span class='l32'>
  943. Alias
  944. </span><span class='l37'>
  945. Command</span><span class='d37'>: #alias </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  946. The syntax of the #alias command is almost like alias in csh.
  947. Use this command to define aliases. The variables %0, %1.. %9 contain
  948. the arguments to the aliased command as follows:
  949. the %0 variable contains ALL the arguments.
  950. the %1 variable contains the 1st argument
  951. ....
  952. the %9 variable contains the 9th argument
  953. </span><span class='l37'>Example</span><span class='d37'>: #alias greet say Greetings, most honorable %1
  954. If there are no variables on the right-side of the alias definition,
  955. any arguments following the aliases-command will be appended to the
  956. command string.
  957. </span><span class='l37'>Example</span><span class='d37'>: #alias ff cast 'fireball' -- 'ff bob' equals: cast 'fireball' bob
  958. If you want an alias to execute more commands, you must use braces.
  959. </span><span class='l37'>Example</span><span class='d37'>: #alias ws </span><span class='l37'>{</span><span class='d37'>wake;stand</span><span class='l37'>}</span><span class='d37'>
  960. To delete an alias use the #unalias command.
  961. WARNING! TinTin++ doesn't baby sit, and hence does not check for
  962. recursive aliases! You can avoid recursion by escaping the entire
  963. line.
  964. </span><span class='l37'>Example</span><span class='d37'>: #alias put &bsol;put %1 in %2
  965. Or by using the send command.
  966. </span><span class='l37'>Example</span><span class='d37'>: #send put %1 in %2
  967. </span><span class='l32'> Action
  968. </span><span class='l37'>Command</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>action-text</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  969. Use this command to define an action to take place when a particular
  970. text appears on your screen. There are 99 variables you can use as
  971. wildcards in the action-text.
  972. These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99.
  973. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>You are hungry</span><span class='l37'>} {</span><span class='d37'>get bread bag;eat bread</span><span class='l37'>}</span><span class='d37'>
  974. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>%1 has arrived.</span><span class='l37'>}</span><span class='d37'> shake %1 -- shake hands with people arriving.
  975. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>%1 tells you '%2'</span><span class='l37'>}
  976. {</span><span class='d37'>tell bob %1 told me '%2'</span><span class='l37'>}</span><span class='d37'> -- forward tells.
  977. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>tells you</span><span class='l37'>}</span><span class='d37'> #bell -- beep on tell.
  978. You can have TinTin++ ignore actions if you type '#ignore actions on'.
  979. You can see what commands TinTin++ executes when an action triggers
  980. by typing '#debug actions on'.
  981. You can remove actions with the #unaction command.
  982. </span><span class='l32'>
  983. Highlight
  984. </span><span class='l37'>Command</span><span class='d37'>: #highlight </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>} {</span><span class='d37'>color</span><span class='l37'>}</span><span class='d37'>
  985. This command works a bit like #action. The purpose of this command is
  986. to substitute text from the server with color you provide. This command
  987. is a simplified version of the #substitute command.
  988. </span><span class='l37'>Example</span><span class='d37'>: #high </span><span class='l37'>{</span><span class='d37'>Snowy</span><span class='l37'>} {</span><span class='d37'>light yellow</span><span class='l37'>}</span><span class='d37'>
  989. </span><span class='l37'>Example</span><span class='d37'>: #high </span><span class='l37'>{</span><span class='d37'>%*Snowy%*</span><span class='l37'>} {</span><span class='d37'>light yellow</span><span class='l37'>}</span><span class='d37'>
  990. Use #unhigh to delete highlights.
  991. Speedwalk
  992. If you type a command consisting ONLY of letters and numbers n, e, s,
  993. w, u, d - then this command can be interpreted as a serie of movement
  994. commands.
  995. </span><span class='l37'>Example</span><span class='d37'>: ssw2n -- go south, south, west, north, north
  996. If you have problems with typing some commands that actually ONLY
  997. consists of these letters, then type them in CAPS. For example when
  998. checking the NEWS or when asked to enter NEW as your name.
  999. You must enable speedwalking with: #config speedwalk on/off.
  1000. </span><span class='l32'>
  1001. Ticker
  1002. </span><span class='l37'>Command</span><span class='d37'>: #ticker </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>seconds</span><span class='l37'>}</span><span class='d37'>
  1003. The name can be whatever you want it to be, and is only required for
  1004. the unticker command. The commands will be executed every x amount of
  1005. seconds, which is specified in the interval part.
  1006. </span><span class='l37'>Example</span><span class='d37'>: #tick </span><span class='l37'>{</span><span class='d37'>tick</span><span class='l37'>} {</span><span class='d37'>#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!</span><span class='l37'>} {</span><span class='d37'>60</span><span class='l37'>}</span><span class='d37'>
  1007. This creates a ticker with the name </span><span class='l37'>{</span><span class='d37'>tick</span><span class='l37'>}</span><span class='d37'> which will print TICK!!!,
  1008. as well as print a warning when the next tick will occure.
  1009. You can remove tickers with #untick
  1010. </span><span class='l32'>
  1011. Command files
  1012. </span><span class='d37'>
  1013. When you order TinTin++ to read a command file, it parses all the text
  1014. in the file. You can use command files to keep aliases/actions in,
  1015. login to a server (name, password etc..) and basically all kinds of
  1016. commands.
  1017. You can make the command files with either a text editor (suggested),
  1018. or use the #write command to write out a file.
  1019. Commands for files:
  1020. #read filename -- read and execute the file.
  1021. #write filename -- write all actions/aliases/substitutes/etc known for
  1022. the current session to a file.
  1023. </span><span class='l32'>
  1024. Repeating Commands
  1025. </span><span class='d37'>
  1026. You can repeat a command, the syntax is: #number command
  1027. </span><span class='l37'>Example</span><span class='d37'>: #5 cackle -- if you just killed bob the wizard.
  1028. </span><span class='l37'>Example</span><span class='d37'>: #10 </span><span class='l37'>{</span><span class='d37'>buy bread;put bread bag</span><span class='l37'>}</span><span class='d37'> -- repeat these 2 commands 10 times.
  1029. </span><span class='l37'>Example</span><span class='d37'>: #100 ooc w00t w00t!!!!! -- nochannel yourself.
  1030. </span><span class='l32'>
  1031. History
  1032. </span><span class='d37'>
  1033. TinTin++ has a limited subset of the csh history features.
  1034. ! -- repeat the last command
  1035. !cast -- repeat the last command starting with cast
  1036. ctrl-r -- enter the reverse history search mode.
  1037. </span><span class='l32'>
  1038. Map commands
  1039. </span><span class='d37'>
  1040. TinTin++ has a powerful highly configurable automapper. Whenever
  1041. you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your
  1042. movement.
  1043. Commands for map:
  1044. #map create -- create a map.
  1045. #map goto 1 -- go to the first room in the map, created by default.
  1046. #map map -- display the map.
  1047. #map undo -- undo your last map alteration.
  1048. #map write &lt;filename&gt; -- save the map to file.
  1049. #map read &lt;filename&gt; -- load a map from file.
  1050. There are many other map options and it's beyond the scope of this
  1051. help section to explain everything there is to know, but I'll give
  1052. a set of commands that will get most people started.
  1053. #map create
  1054. #split 12 1
  1055. #map flag unicode on
  1056. #map flag vt on
  1057. #map goto 1
  1058. These commands will create a 12 row vt100 split section at the top of
  1059. your screen where a map drawn using unicode characters is displayed.
  1060. </span><span class='l37'>Example</span><span class='d37'>: #action </span><span class='l37'>{</span><span class='d37'>There is no exit in that direction.</span><span class='l37'>} {</span><span class='d37'>#map undo</span><span class='l37'>}</span><span class='d37'>
  1061. The map will be automatically created as you move around.
  1062. </span><span class='l32'>
  1063. Help
  1064. </span><span class='l37'>Command</span><span class='d37'>: #help </span><span class='l37'>{</span><span class='d37'>subject</span><span class='l37'>}</span><span class='d37'>
  1065. The help command is your friend and contains the same helpfiles
  1066. inside TinTin++ as are available on the website. If you type #help
  1067. without an argument you will see the various available help subjects
  1068. which try to explain the TinTin++ commands and features in greater
  1069. detail.
  1070. </span><span class='l32'>
  1071. Enjoy</span><span class='d37'>
  1072. <a name='INFO'></a>
  1073. </span><span class='l32'> INFO
  1074. </span><span class='l37'>Command</span><span class='d37'>: #info </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>LIST</span><span class='l37'>|</span><span class='d37'>ON</span><span class='l37'>|</span><span class='d37'>OFF</span><span class='l37'>|</span><span class='d37'>SAVE</span><span class='l37'>}</span><span class='d37'>
  1075. Without an argument info displays the settings of every tintin list.
  1076. By providing the name of a list and the LIST option it shows all
  1077. triggers/variables associated with that list. With the SAVE option
  1078. This data is written to the info variable.
  1079. #info cpu will show information about tintin's cpu usage.
  1080. #info mccp will show information about data compression.
  1081. #info stack will show the low level debugging stack.
  1082. #info session will show some session information.
  1083. #info system will show some system information.
  1084. </span><span class='l37'>Related</span><span class='d37'>: class, debug, ignore, kill and message.
  1085. <a name='KEYPAD'></a>
  1086. </span><span class='l32'> KEYPAD
  1087. </span><span class='d37'>When TinTin++ starts up it sends &bsol;e= to the terminal to enable the terminal's
  1088. application keypad mode, which can be disabled using #showme {&bsol;e&gt;}
  1089. </span><span class='l37'> Configuration A Configuration B Configuration C</span><span class='d36'>
  1090. ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮
  1091. │</span><span class='l37'>num</span><span class='d36'> │</span><span class='l37'>/</span><span class='d36'> │</span><span class='l37'>*</span><span class='d36'> │</span><span class='l37'>-</span><span class='d36'> │ │</span><span class='l37'>num</span><span class='d36'> │</span><span class='l37'>/</span><span class='d36'> │</span><span class='l37'>*</span><span class='d36'> │</span><span class='l37'>-</span><span class='d36'> │ │</span><span class='l37'>Num</span><span class='d36'> │</span><span class='l37'>nkp/</span><span class='d36'> │</span><span class='l37'>nkp*</span><span class='d36'> │</span><span class='l37'>nkp-</span><span class='d36'> │
  1092. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  1093. │</span><span class='l37'>7</span><span class='d36'> │</span><span class='l37'>8</span><span class='d36'> │</span><span class='l37'>9</span><span class='d36'> │</span><span class='l37'>+</span><span class='d36'> │ │</span><span class='l37'>Home</span><span class='d36'> │</span><span class='l37'>Up</span><span class='d36'> │</span><span class='l37'>PgUp</span><span class='d36'> │</span><span class='l37'>+</span><span class='d36'> │ │</span><span class='l37'>nkp7</span><span class='d36'> │</span><span class='l37'>nkp8</span><span class='d36'> │</span><span class='l37'>nkp9</span><span class='d36'> │</span><span class='l37'>nkp+</span><span class='d36'> │
  1094. ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │
  1095. │</span><span class='l37'>4</span><span class='d36'> │</span><span class='l37'>5</span><span class='d36'> │</span><span class='l37'>6</span><span class='d36'> │ │ │</span><span class='l37'>Left</span><span class='d36'> │</span><span class='l37'>Cntr</span><span class='d36'> │</span><span class='l37'>Right</span><span class='d36'>│ │ │</span><span class='l37'>nkp4</span><span class='d36'> │</span><span class='l37'>nkp5</span><span class='d36'> │</span><span class='l37'>nkp6</span><span class='d36'> │ │
  1096. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  1097. │</span><span class='l37'>1</span><span class='d36'> │</span><span class='l37'>2</span><span class='d36'> │</span><span class='l37'>3</span><span class='d36'> │</span><span class='l37'>Enter</span><span class='d36'>│ │</span><span class='l37'>End</span><span class='d36'> │</span><span class='l37'>Down</span><span class='d36'> │</span><span class='l37'>PgDn</span><span class='d36'> │</span><span class='l37'>Enter</span><span class='d36'>│ │</span><span class='l37'>nkp1</span><span class='d36'> │</span><span class='l37'>nkp2</span><span class='d36'> │</span><span class='l37'>nkp3</span><span class='d36'> │</span><span class='l37'>nkpEn</span><span class='d36'>│
  1098. ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │
  1099. │</span><span class='l37'>0</span><span class='d36'> │</span><span class='l37'>.</span><span class='d36'> │ │ │</span><span class='l37'>Ins</span><span class='d36'> │</span><span class='l37'>Del</span><span class='d36'> │ │ │</span><span class='l37'>nkp0</span><span class='d36'> │</span><span class='l37'>nkp.</span><span class='d36'> │ │
  1100. ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯
  1101. </span><span class='d37'>
  1102. With keypad mode disabled numlock on will give you configuration A, and numlock
  1103. off will give you configuration B. With keypad mode enabled you'll get
  1104. configuration C.
  1105. </span><span class='l37'>Terminals that support keypad mode
  1106. </span><span class='d37'>Linux Console, PuTTY, Eterm, aterm.
  1107. </span><span class='l37'>Terminals that do not support keypad mode
  1108. </span><span class='d37'>RXVT on Cygwin, Windows Console, Gnome Terminal, Konsole.
  1109. </span><span class='l37'>Peculiar Terminals
  1110. </span><span class='d37'>RXVT requires turning off numlock to enable configuration C.
  1111. Xterm may require disabling Alt/NumLock Modifiers (num-lock) in the ctrl-left
  1112. click menu. Or edit ~/.Xresources and add XTerm*VT100.numLock:false
  1113. Mac OS X Terminal requires enabling 'strict vt100 keypad behavior' in
  1114. Terminal -&gt; Window Settings -&gt; Emulation.
  1115. </span><span class='l37'>Related</span><span class='d37'>: colors, coordinates, escape, mathematics and pcre.
  1116. <a name='KILL'></a>
  1117. </span><span class='l32'> KILL
  1118. </span><span class='l37'>Command</span><span class='d37'>: #kill </span><span class='l37'>{</span><span class='d37'>list</span><span class='l37'>} {</span><span class='d37'>pattern</span><span class='l37'>}</span><span class='d37'>
  1119. Without an argument, the kill command clears all lists. Useful if
  1120. you don't want to exit tintin to reload your command files.
  1121. With one argument a specific list can be cleared.
  1122. With two arguments the triggers in the chosen list that match the
  1123. given pattern will be removed.
  1124. </span><span class='l37'>Example</span><span class='d37'>: #kill alias %*test*
  1125. </span><span class='l37'>Related</span><span class='d37'>: class, debug, ignore, info and message.
  1126. <a name='LINE'></a>
  1127. </span><span class='l32'> LINE
  1128. </span><span class='l37'>Command</span><span class='d37'>: #line </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1129. </span><span class='l37'>#line background &lt;argument&gt;
  1130. </span><span class='d37'> Prevent new session activation.
  1131. </span><span class='l37'>#line capture &lt;variable&gt; &lt;argument.
  1132. </span><span class='d37'> Argument is executed and output stored in &lt;variable&gt;.
  1133. </span><span class='l37'>#line debug &lt;argument&gt;
  1134. </span><span class='d37'> Argument is executed in debug mode.
  1135. </span><span class='l37'>#line gag
  1136. </span><span class='d37'> Gag the next line.
  1137. </span><span class='l37'>#line ignore {argument}
  1138. </span><span class='d37'> Argument is executed without any triggers being checked.
  1139. </span><span class='l37'>#line log &lt;filename&gt; [text]
  1140. </span><span class='d37'> Log the next line to file unless the [text] argument is
  1141. provided.
  1142. </span><span class='l37'>#line logmode &lt;option&gt; &lt;argument&gt;
  1143. </span><span class='d37'> Argument is executed using the provided logmode, available
  1144. modes are: html, plain, and raw.
  1145. </span><span class='l37'>#line oneshot &lt;argument&gt;
  1146. </span><span class='d37'> Argument is executed in oneshot mode, all triggers created will
  1147. only fire once.
  1148. </span><span class='l37'>#line quiet &lt;argument&gt;
  1149. </span><span class='d37'> Argument is executed with suppression of most system messages.
  1150. </span><span class='l37'>#line strip &lt;argument&gt;
  1151. </span><span class='d37'> Argument is executed with all color codes stripped.
  1152. </span><span class='l37'>#line substitute &lt;options&gt; &lt;argument&gt;
  1153. </span><span class='d37'> Argument is executed using the provided substitutions, available
  1154. options are: arguments, colors, escapes, functions, secure, and
  1155. variables.
  1156. </span><span class='l37'>#line verbatim &lt;argument&gt;
  1157. </span><span class='d37'> Argument is executed verbatim, prohibiting variable and function
  1158. substitutions.
  1159. </span><span class='l37'>#line verbose &lt;argument&gt;
  1160. </span><span class='d37'> Argument is executed with most system messages enabled.
  1161. When using #line log and logging in html format use &bsol;c&lt; &bsol;c&gt; &bsol;c&amp; &bsol;c&quot; to
  1162. log a literal &lt; &gt; &amp; and &quot;.
  1163. </span><span class='l37'>Related</span><span class='d37'>: class and config.
  1164. <a name='LIST'></a>
  1165. </span><span class='l32'> LIST
  1166. </span><span class='l37'>Command</span><span class='d37'>: #list </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1167. #list {var} {add} {item} Add {item} to the list
  1168. #list {var} {clear} Empty the given list
  1169. #list {var} {collapse} Turn list into a variable
  1170. #list {var} {create} {item} Create a list using {items}
  1171. #list {var} {delete} {index} {number} Delete the item at {index},
  1172. the {number} is optional.
  1173. #list {var} {explode} Turn list into a character list
  1174. #list {var} {insert} {index} {string} Insert {string} at given index
  1175. #list {var} {find} {string} {variable} Return the found index
  1176. #list {var} {get} {index} {variable} Copy an item to {variable}
  1177. #list {var} {shuffle} Shuffle the list
  1178. #list {var} {set} {index} {string} Change the item at {index}
  1179. #list {var} {simplify} {variable} Copy simple list to {variable}
  1180. #list {var} {size} {variable} Copy list size to {variable}
  1181. #list {var} {sort} {string} Insert item in alphabetic order
  1182. #list {var} {tokenize} {string} Create a character list
  1183. The index should be between 1 and the list's length. You can also give
  1184. a negative value, in which case -1 equals the last item in the list, -2
  1185. the second last, etc.
  1186. When inserting an item a positive index will prepend the item at the
  1187. given index, while a negative index will append the item.
  1188. The add and create options allow using multiple items, as well
  1189. as semicolon separated items.
  1190. A length of 0 is returned for an empty or non existant list.
  1191. You can directly access elements in a list variable using &dollar;var[1],
  1192. &dollar;var[2], &dollar;var[-1], etc.
  1193. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, loop, parse, repeat, return and while.
  1194. <a name='LOCAL'></a>
  1195. </span><span class='l32'> LOCAL
  1196. </span><span class='l37'>Command</span><span class='d37'>: #local </span><span class='l37'>{</span><span class='d37'>variable name</span><span class='l37'>} {</span><span class='d37'>text to fill variable</span><span class='l37'>}</span><span class='d37'>
  1197. The local command sets a local variable. Unlike a regular variable
  1198. a local variable will only stay in memory for the duration of the
  1199. event that created it. They are accessed in the same way as a
  1200. regular variable.
  1201. Commands that store information to a variable will use a local variable
  1202. if it exists.
  1203. Avoid setting the result variable as local in a function.
  1204. </span><span class='l37'>Example</span><span class='d37'>: #alias {swap} {#local x %0;#replace x {e} {u};#showme &dollar;x}
  1205. </span><span class='l37'>Related</span><span class='d37'>: format, function, math, replace, script and variable.
  1206. <a name='LOG'></a>
  1207. </span><span class='l32'> LOG
  1208. </span><span class='l37'>Command</span><span class='d37'>: #log </span><span class='l37'>{</span><span class='d37'>append</span><span class='l37'>|</span><span class='d37'>overwrite</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>} {</span><span class='d37'>[filename]</span><span class='l37'>}</span><span class='d37'>
  1209. Logs session output to a file, you can set the data type to either
  1210. plain, raw, or html with the config command.
  1211. </span><span class='l37'>Related</span><span class='d37'>: read, scan, textin and write.
  1212. <a name='LOOP'></a>
  1213. </span><span class='l32'> LOOP
  1214. </span><span class='l37'>Command</span><span class='d37'>: #loop </span><span class='l37'>{</span><span class='d37'>&lt;start&gt;</span><span class='l37'>} {</span><span class='d37'>&lt;finish&gt;</span><span class='l37'>} {</span><span class='d37'>&lt;variable&gt;</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1215. Like a for statement, loop will loop from start to finish incrementing
  1216. or decrementing by 1 each time through. The value of the loop counter
  1217. is stored in the provided variable, which you can use in the commands.
  1218. </span><span class='l37'>Example</span><span class='d37'>: #loop 1 3 loop {get all &dollar;loop&bsol;.corpse}
  1219. This equals 'get all 1.corpse;get all 2.corpse;get all 3.corpse'.
  1220. The . needs to be escaped so it's not treated as part of the variable.
  1221. </span><span class='l37'>Example</span><span class='d37'>: #loop 3 1 cnt {drop &dollar;cnt&bsol;.key}
  1222. This equals 'drop 3.key;drop 2.key;drop 1.key'.
  1223. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, parse, repeat, return and while.
  1224. <a name='MACRO'></a>
  1225. </span><span class='l32'> MACRO
  1226. </span><span class='l37'>Command</span><span class='d37'>: #macro </span><span class='l37'>{</span><span class='d37'>key sequence</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1227. Macros allow you to make tintin respond to function keys.
  1228. The key sequence send to the terminal when pressing a function key
  1229. differs for every OS and terminal. To find out what sequence is send
  1230. you can enable the CONVERT META config option.
  1231. Another option is pressing ctrl-v, which will enable CONVERT META for
  1232. the next key pressed.
  1233. If you only want a key sequence to trigger at the start of an input
  1234. line prefix the key sequence with ^.
  1235. </span><span class='l37'>Example</span><span class='d37'>: #macro {(press ctrl-v)(press F1)} {#showme &bsol;e[2J;#buffer lock}
  1236. Clear the screen and lock the window when you press F1, useful when the
  1237. boss is near.
  1238. </span><span class='l37'>Example</span><span class='d37'>: #macro {&bsol;eOM} {#cursor enter}
  1239. Makes the keypad's enter key work as an enter in keypad mode.
  1240. </span><span class='l37'>Example</span><span class='d37'>: #macro {^nn} {n}
  1241. Makes pressing n twice on an empty line execute north.
  1242. </span><span class='l37'>Comment</span><span class='d37'>: Not all terminals properly initialize the keypad key sequences.
  1243. If this is the case you can still use the keypad, but instead of the
  1244. arrow keys use ctrl b, f, p, and n.
  1245. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a macro with the #unmacro command.
  1246. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, history, keypad, speedwalk and tab.
  1247. <a name='MAP'></a>
  1248. </span><span class='l32'> MAP
  1249. </span><span class='l37'>Command</span><span class='d37'>: #map
  1250. The map command is the backbone of the auto mapping feature.
  1251. </span><span class='l37'>#map at &lt;exit|vnum&gt; &lt;command&gt;
  1252. </span><span class='d37'> Execute the command at the given exit or vnum.
  1253. </span><span class='l37'>#map center &lt;x&gt; &lt;y&gt; &lt;z&gt;
  1254. </span><span class='d37'> Sets displaying center of the map viewer, default is 0 0 0.
  1255. </span><span class='l37'>#map color &lt;field&gt; [value]
  1256. </span><span class='d37'> Sets the map color for the given color field.
  1257. </span><span class='l37'>#map create &lt;size&gt;
  1258. </span><span class='d37'> Creates a new map and room 1. The default size is 50000 rooms.
  1259. </span><span class='l37'>#map destroy {area|world} &lt;name&gt;
  1260. </span><span class='d37'> Deletes the map or given area.
  1261. </span><span class='l37'>#map delete &lt;exit|vnum&gt;
  1262. </span><span class='d37'> Deletes the room for the given exit or vnum.
  1263. </span><span class='l37'>#map dig &lt;exit|vnum&gt; [new|&lt;vnum&gt;]
  1264. </span><span class='d37'> Creates an exit for the given exit name. If no valid exit name
  1265. is given or no existing room is found a new room is created.
  1266. Useful for portal links and other alternative forms of
  1267. transportation. If the 'new' argument is provided all existing
  1268. rooms are ignored and a new room is created. If a room vnum is
  1269. given as the second argument an exit will be created leading
  1270. to the given room vnum. If the room vnum doesn't exist a new
  1271. room is created.
  1272. </span><span class='l37'>#map entrance &lt;exit&gt; [option] [arg]
  1273. </span><span class='d37'> Set the entrance data for the given exit. You must specify a
  1274. valid two-way exit for this to work.
  1275. </span><span class='l37'>#map exit &lt;exit&gt; &lt;option&gt; &lt;arg&gt;
  1276. </span><span class='d37'> Set the exit data. Useful with a closed door where you can
  1277. set the exit command: '#map exit e command {open east;e}'.
  1278. Use #map exit &lt;exit&gt; for a list of available options.
  1279. </span><span class='l37'>#map exitflag &lt;exit&gt; &lt;AVOID|BLOCK|HIDE|INVIS&gt; [on|off]
  1280. </span><span class='d37'> Set exit flags. See #map roomflag for more info.
  1281. </span><span class='l37'>#map explore &lt;exit&gt;
  1282. </span><span class='d37'> Explores the given exit until a dead end or an
  1283. intersection is found. The route is stored in #path and can
  1284. subsequently be used with #walk. Useful for long roads.
  1285. </span><span class='l37'>#map find &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt; &lt;flag&gt;
  1286. </span><span class='d37'> searches for the given room name. If found the shortest path
  1287. from your current location to the destination is calculated.
  1288. The route is stored in #path and can subsequently be used with
  1289. the various #path commands. If &lt;exits&gt; is provided all exits
  1290. must be matched, if &lt;roomdesc&gt;, &lt;roomarea&gt; or &lt;roomnote&gt; or
  1291. &lt;roomterrain&gt; or &lt;roomflag&gt; is provided these are matched as
  1292. well against the room to be found.
  1293. These options are also available to the at, delete, goto
  1294. link, list and run commands.
  1295. </span><span class='l37'>#map flag asciigraphics
  1296. </span><span class='d37'> Takes up more space but draws a more detailed
  1297. map that displays the ne se sw nw exits and room symbols.
  1298. </span><span class='l37'>#map flag asciivnums
  1299. </span><span class='d37'> Display room vnums if asciigraphics is enabled.
  1300. </span><span class='l37'>#map flag nofollow
  1301. </span><span class='d37'> When you enter movement commands the map will no longer
  1302. automatically follow along. Useful for MSDP and GMCP
  1303. automapping scripts.
  1304. </span><span class='l37'>#map flag static
  1305. </span><span class='d37'> Will make the map static so new rooms are no longer
  1306. created when walking into an unmapped direction. Useful when
  1307. you're done mapping and regularly bump into walls accidentally
  1308. creating a new room. #map dig etc will still work.
  1309. </span><span class='l37'>#map flag vtgraphics
  1310. </span><span class='d37'> Enables vt line drawing on some terminals
  1311. </span><span class='l37'>#map flag vtmap
  1312. </span><span class='d37'> Will enable the vtmap which is shown in the top split
  1313. screen if you have one. You can create a 16 rows high top
  1314. screen by using '#split 16 1'.
  1315. </span><span class='l37'>#map get &lt;option&gt; &lt;variable&gt; [vnum]
  1316. </span><span class='d37'> Store a map value into a variable, if no vnum is given the
  1317. current room is used. Use 'all' as the option to store all
  1318. values as a table.
  1319. </span><span class='l37'>#map get roomexits &lt;variable&gt;
  1320. </span><span class='d37'> Store all room exits into variable.
  1321. </span><span class='l37'>#map global &lt;room vnum&gt;
  1322. </span><span class='d37'> Set the vnum of a room that contains global
  1323. exits, for example an exit named 'recall' that leads to the
  1324. recall location. The room can contain multiple exits, in case
  1325. there are multiple commands that are similar to recall.
  1326. </span><span class='l37'>#map goto &lt;room vnum&gt; [dig]
  1327. </span><span class='d37'> Takes you to the given room vnum, with the
  1328. dig argument a new room will be created if none exists.
  1329. </span><span class='l37'>#map goto &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt;
  1330. </span><span class='d37'> Takes you to the given room name, if you provide exits those
  1331. must match.
  1332. </span><span class='l37'>#map info
  1333. </span><span class='d37'> Gives information about the map and room you are in.
  1334. </span><span class='l37'>#map insert &lt;direction&gt; [roomflag]
  1335. </span><span class='d37'> Insert a room in the given direction. Most useful for inserting
  1336. void rooms.
  1337. </span><span class='l37'>#map jump &lt;x&gt; &lt;y&gt; &lt;z&gt;
  1338. </span><span class='d37'> Jump to the given coordinate, which is relative
  1339. to your current room.
  1340. </span><span class='l37'>#map landmark &lt;name&gt; &lt;vnum&gt; [description] [size]
  1341. </span><span class='d37'> Creates an alias to target the provided room vnum. The
  1342. description is optional and should be brief. The size
  1343. determines from how many rooms away the landmark can be
  1344. seen.
  1345. </span><span class='l37'>#map leave
  1346. </span><span class='d37'> Makes you leave the map. Useful when entering a maze. You
  1347. can return to your last known room using #map return.
  1348. </span><span class='l37'>#map legend &lt;legend&gt; [symbols|reset]
  1349. #map legend &lt;legend&gt; &lt;index&gt; [symbol]
  1350. </span><span class='d37'> There are several legends and sub-legends available for
  1351. drawing maps to suit personal preference and character sets.
  1352. Use #map legend all to see the legend as currently defined.
  1353. Use #map legend &lt;legend&gt; &lt;reset&gt; to set the default legend.
  1354. Use #map legend &lt;legend&gt; &lt;character list&gt; to create a custom
  1355. legend. Custom legends are automatically saved and loaded by
  1356. using #map read and #map write.
  1357. </span><span class='l37'>#map link &lt;direction&gt; &lt;room name&gt; [both]
  1358. </span><span class='d37'> Links two rooms. If the both
  1359. argument and a valid direction is given the link is two ways.
  1360. </span><span class='l37'>#map list &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt;
  1361. </span><span class='d37'> Lists all matching rooms and their distance. The following
  1362. search keywords are supported.
  1363. {roomarea} &lt;arg&gt; will list rooms with matching area name.
  1364. {roomdesc} &lt;arg&gt; will list rooms with matching room desc.
  1365. {roomexits} &lt;arg&gt; will list rooms with identical room exits.
  1366. {roomflag} &lt;arg&gt; will list rooms with matching room flags.
  1367. {roomid} &lt;arg&gt; will list rooms with identical id name.
  1368. {roomname} &lt;arg&gt; will list rooms with matching room name.
  1369. {roomnote} &lt;arg&gt; will list rooms with matching room note.
  1370. {roomterrain} &lt;arg&gt; will list rooms with matching room terrain.
  1371. {variable} &lt;arg&gt; will save the output to given variable.
  1372. </span><span class='l37'>#map map &lt;rows&gt; &lt;cols&gt; &lt;append|overwrite|list|variable&gt; &lt;name&gt;
  1373. </span><span class='d37'> Display a drawing of the map of the given height and width.
  1374. All arguments are optional. If {rows} or {cols} are set to {}
  1375. or {0} they will use the scrolling window size as the default.
  1376. If {rows} or {cols} are a negative number this number is
  1377. subtracted from the scrolling window size.
  1378. </span><span class='l37'>#map map &lt;rows&gt; &lt;cols&gt; draw &lt;square&gt;
  1379. </span><span class='d37'> Display a drawing of the map of the given height and width.
  1380. The square argument exists of 4 numbers formulating the top
  1381. left corner and bottom right corner of a square.
  1382. If you use {append|overwrite} the map is written to the specified
  1383. file name which must be given as the 4th argument.
  1384. If you use {list|variable} the map is saved to the specified
  1385. variable name.
  1386. </span><span class='l37'>#map move &lt;direction&gt;
  1387. </span><span class='d37'> This does the same as an actual movement
  1388. command, updating your location on the map and creating new
  1389. rooms. Useful when you are following someone and want the map
  1390. to follow. You will need to create actions using '#map move',
  1391. for this to work.
  1392. </span><span class='l37'>#map offset &lt;row&gt; &lt;col&gt; &lt;row&gt; &lt;col&gt;
  1393. </span><span class='d37'> Define the offset of the vtmap as a square. Without an argument
  1394. it defaults to the entire top split region.
  1395. </span><span class='l37'>#map read &lt;filename&gt;
  1396. </span><span class='d37'> Will load the given map file.
  1397. </span><span class='l37'>#map resize &lt;size&gt;
  1398. </span><span class='d37'> Resize the map, setting the maximum number of rooms.
  1399. </span><span class='l37'>#map return
  1400. </span><span class='d37'> Returns you to your last known room after leaving the map
  1401. or loading a map.
  1402. </span><span class='l37'>#map roomflag &lt;flags&gt; &lt;get|on|off&gt;
  1403. </span><span class='d37'>
  1404. </span><span class='l37'>#map roomflag avoid
  1405. </span><span class='d37'> When set, '#map find' will avoid a route leading
  1406. through that room. Useful for locked doors, etc.
  1407. </span><span class='l37'>#map roomflag block
  1408. </span><span class='d37'> When set the automapper will prevent movement into or through
  1409. the room. Useful for death traps.
  1410. </span><span class='l37'>#map roomflag hide
  1411. </span><span class='d37'> When set, '#map' will not display the map beyond
  1412. this room. When mapping overlapping areas or areas that aren't
  1413. build consistently you need this flag as well to stop
  1414. auto-linking, unless you use void rooms.
  1415. </span><span class='l37'>#map roomflag invis
  1416. </span><span class='d37'> When set the room will be colored with the INVIS color.
  1417. </span><span class='l37'>#map roomflag leave
  1418. </span><span class='d37'> When entering a room with this flag, you will
  1419. automatically leave the map. Useful when set at the entrance
  1420. of an unmappable maze.
  1421. </span><span class='l37'>#map roomflag noglobal
  1422. </span><span class='d37'> This marks a room as not allowing global
  1423. transportation, like norecall rooms that block recall.
  1424. </span><span class='l37'>#map roomflag void
  1425. </span><span class='d37'> When set the room becomes a spacing room that can
  1426. be used to connect otherwise overlapping areas. A void room
  1427. should only have two exits. When entering a void room you are
  1428. moved to the connecting room until you enter a non void room.
  1429. </span><span class='l37'>#map roomflag static
  1430. </span><span class='d37'> When set the room will no longer be autolinked
  1431. when walking around. Useful for mapping mazes.
  1432. </span><span class='l37'>#map run &lt;room name&gt; [delay]
  1433. </span><span class='d37'> Calculates the shortest path to the destination and walks you
  1434. there. The delay is optional and requires using braces. Besides
  1435. the room name a list of exits can be provided for more precise
  1436. matching.
  1437. </span><span class='l37'>#map set &lt;option&gt; &lt;value&gt; [vnum]
  1438. </span><span class='d37'> Set a map value for your current room, or given room if a room
  1439. vnum is provided.
  1440. </span><span class='l37'>#map sync &lt;filename&gt;
  1441. </span><span class='d37'> Similar to #map read except the current map won't be unloaded
  1442. or overwritten.
  1443. </span><span class='l37'>#map terrain &lt;name&gt; &lt;symbol&gt; [flag]
  1444. </span><span class='d37'> Set the terrain symbol and flag.
  1445. </span><span class='l37'>#map terrain &lt;name&gt; &lt;symbol&gt; [DENSE|SPARSE|SCANT]
  1446. </span><span class='d37'> Determine symbol density, omit for the default.
  1447. </span><span class='l37'>#map terrain &lt;name&gt; &lt;symbol&gt; [NARROW|WIDE|VAST]
  1448. </span><span class='d37'> Determine symbol spread range, omit for the default.
  1449. </span><span class='l37'>#map terrain &lt;name&gt; &lt;symbol&gt; [FADEIN|FADEOUT]
  1450. </span><span class='d37'> Determine symbol spread density, omit for the default.
  1451. </span><span class='l37'>#map travel &lt;direction&gt; &lt;delay&gt;
  1452. </span><span class='d37'> Follows the direction until a dead end or an intersection is
  1453. found. Use braces around the direction if you use the delay,
  1454. which will add the given delay between movements.
  1455. Use #path stop to stop a delayed run.
  1456. </span><span class='l37'>#map undo
  1457. </span><span class='d37'> Will undo your last move. If this created a room or a link
  1458. they will be deleted, otherwise you'll simply move back a
  1459. room. Useful if you walked into a non existant direction.
  1460. </span><span class='l37'>#map uninsert &lt;direction&gt;
  1461. </span><span class='d37'> Exact opposite of the insert command.
  1462. </span><span class='l37'>#map unlandmark &lt;name&gt;
  1463. </span><span class='d37'> Removes a landmark.
  1464. </span><span class='l37'>#map unlink &lt;direction&gt; [both]
  1465. </span><span class='d37'> Will remove the exit, this isn't two way so you can have the
  1466. properly display no exit rooms and mazes.
  1467. If you use the both argument the exit is removed two-ways.
  1468. </span><span class='l37'>#map unterrain &lt;name&gt;
  1469. </span><span class='d37'> Removes a terrain.
  1470. </span><span class='l37'>#map update
  1471. </span><span class='d37'> Sets the vtmap to update within the next 0.1 seconds.
  1472. </span><span class='l37'>#map vnum &lt;low&gt; [high]
  1473. </span><span class='d37'> Change the room vnum to the given number, if a range is
  1474. provided the first available room in that range is selected.
  1475. </span><span class='l37'>#map write &lt;filename&gt; [force]
  1476. </span><span class='d37'> Will save the map, if you want to save a map to a .tin file
  1477. you must provide the {force} argument.
  1478. </span><span class='l37'>Related</span><span class='d37'>: path and pathdir.
  1479. <a name='MATH'></a>
  1480. </span><span class='l32'> MATH
  1481. </span><span class='l37'>Command</span><span class='d37'>: #math </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>expression</span><span class='l37'>}</span><span class='d37'>
  1482. Performs math operations and stores the result in a variable. The math
  1483. follows a C-like precedence, as follows, with the top of the list
  1484. having the highest priority.
  1485. Operators Priority Function
  1486. ------------------------------------------------
  1487. ! 0 logical not
  1488. ~ 0 bitwise not
  1489. * 1 integer multiply
  1490. ** 1 integer power
  1491. / 1 integer divide
  1492. // 1 integer sqrt // 2 or cbrt // 3
  1493. % 1 integer modulo
  1494. d 1 integer random dice roll
  1495. + 2 integer addition
  1496. - 2 integer subtraction
  1497. &lt;&lt; 3 bitwise shift
  1498. &gt;&gt; 3 bitwise shift
  1499. .. 3 bitwise ellipsis
  1500. &gt; 4 logical greater than
  1501. &gt;= 4 logical greater than or equal
  1502. &lt; 4 logical less than
  1503. &lt;= 4 logical less than or equal
  1504. == 5 logical equal (can use regex)
  1505. === 5 logical equal (never regex)
  1506. != 5 logical not equal (can use regex)
  1507. !== 5 logical not equal (never regex)
  1508. &amp; 6 bitwise and
  1509. ^ 7 bitwise xor
  1510. | 8 bitwise or
  1511. &amp;&amp; 9 logical and
  1512. ^^ 10 logical xor
  1513. || 11 logical or
  1514. True is any non-zero number, and False is zero. Parentheses () have
  1515. highest precedence, so inside the () is always evaluated first.
  1516. Strings must be enclosed in { } and use regex with == and !=,
  1517. in the case of &lt;= and &gt;= the alphabetic order is compared.
  1518. The #if and #switch commands use #math. Several commands accepting
  1519. integer input allow math operations as well.
  1520. Floating point precision is added by using the decimal . operator.
  1521. Time in seconds is calculated using [day]:[hour]:&lt;minute&gt;:&lt;second&gt;.
  1522. </span><span class='l37'>Example</span><span class='d37'>: #math {heals} {&dollar;mana / 40}
  1523. Assuming there is a variable &dollar;mana, divides its value by 40 and stores
  1524. the result in &dollar;heals.
  1525. </span><span class='l37'>Example</span><span class='d37'>: #action {^You receive %0 experience} {updatexp %0}
  1526. #alias updatexp {#math {xpneed} {&dollar;xpneed - %0}
  1527. Let's say you have a variable which stores xp needed for your next
  1528. level. The above will modify that variable after every kill, showing
  1529. the amount still needed.
  1530. </span><span class='l37'>Example</span><span class='d37'>: #action {%0 tells %1}
  1531. {#if {{%0} == {Bubba} &amp;&amp; &dollar;afk} {reply I'm away, my friend.}}
  1532. When you are away from keyboard, it will only reply to your friend.
  1533. </span><span class='l37'>Related</span><span class='d37'>: cat, format, function, local, mathematics, replace, script and variable.
  1534. <a name='MATHEMATICS'></a>
  1535. </span><span class='l32'> MATHEMATICS
  1536. </span><span class='l37'>Number operations
  1537. </span><span class='d37'> Operators Priority Function
  1538. ------------------------------------------------
  1539. ! 0 logical not
  1540. ~ 0 bitwise not
  1541. * 1 integer multiply
  1542. ** 1 integer power
  1543. / 1 integer divide
  1544. // 1 integer sqrt // 2 or cbrt // 3
  1545. % 1 integer modulo
  1546. d 1 integer random dice roll
  1547. + 2 integer addition
  1548. - 2 integer subtraction
  1549. &lt;&lt; 3 bitwise shift
  1550. &gt;&gt; 3 bitwise shift
  1551. &gt; 4 logical greater than
  1552. &gt;= 4 logical greater than or equal
  1553. &lt; 4 logical less than
  1554. &lt;= 4 logical less than or equal
  1555. == 5 logical equal
  1556. != 5 logical not equal
  1557. &amp; 6 bitwise and
  1558. ^ 7 bitwise xor
  1559. | 8 bitwise or
  1560. &amp;&amp; 9 logical and
  1561. ^^ 10 logical xor
  1562. || 11 logical or
  1563. Operator priority can be ignored by using parentheses, for example (1 + 1) * 2
  1564. equals 4, while 1 + 1 * 2 equals 3.
  1565. </span><span class='l37'>String operations</span><span class='d37'>
  1566. Operators Priority Function
  1567. ------------------------------------------------
  1568. &gt; 4 alphabetical greater than
  1569. &gt;= 4 alphabetical greater than or equal
  1570. &lt; 4 alphabetical less than
  1571. &lt;= 4 alphabetical less than or equal
  1572. == 5 alphabetical equal (can use regex)
  1573. != 5 alphabetical not equal (can use regex)
  1574. Strings must be encased in double quotes or braces. The &gt; &gt;= &lt; &lt;= operators
  1575. perform basic string comparisons. The == != operators perform regular
  1576. expressions, with the argument on the left being the string, and the argument
  1577. on the right being the regex. For example {bla} == {%*a} would evaluate as 1.
  1578. </span><span class='l37'>Related</span><span class='d37'>: math
  1579. <a name='MESSAGE'></a>
  1580. </span><span class='l32'> MESSAGE
  1581. </span><span class='l37'>Command</span><span class='d37'>: #message </span><span class='l37'>{</span><span class='d37'>listname</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>}</span><span class='d37'>
  1582. This will show the message status of all your lists if typed without an
  1583. argument. If you set for example VARIABLES to OFF you will no longer be
  1584. spammed when correctly using the #VARIABLE and #UNVARIABLE commands.
  1585. </span><span class='l37'>Related</span><span class='d37'>: class, debug, ignore, info and kill.
  1586. <a name='METRIC SYSTEM'></a>
  1587. </span><span class='l32'> METRIC SYSTEM
  1588. Name Symbol Factor
  1589. --------------------------------------------------
  1590. Mega M 1 000 000
  1591. Kilo K 1 000
  1592. milli m 0.001
  1593. micro u 0.000 001
  1594. </span><span class='l37'>Related</span><span class='d37'>: echo, format and math.
  1595. <a name='MSDP'></a>
  1596. </span><span class='l32'> MSDP
  1597. </span><span class='d37'>
  1598. MSDP is part of the #port functionality. See #help event for
  1599. additional documentation as all MSDP events are available as
  1600. regular events.
  1601. Available MSDP events can be queried using the MSDP protocol
  1602. as described in the specification.
  1603. </span><span class='l37'>
  1604. https://tintin.sourceforge.io/protocols/msdp
  1605. Related</span><span class='d37'>: event and port.
  1606. <a name='NOP'></a>
  1607. </span><span class='l32'> NOP
  1608. </span><span class='l37'>Command</span><span class='d37'>: #nop </span><span class='l37'>{</span><span class='d37'>whatever</span><span class='l37'>}</span><span class='d37'>
  1609. Short for 'no operation', and is ignored by the client. It is useful
  1610. for commenting in your coms file, any text after the nop and before a
  1611. semicolon or end of line is ignored. You shouldn't put braces { } in it
  1612. though, unless you close them properly.
  1613. </span><span class='l37'>Comment</span><span class='d37'>: By using braces you can comment out multiple lines of code in a script
  1614. file.
  1615. For commenting out an entire trigger and especially large sections of
  1616. triggers you would want to use /* text */
  1617. </span><span class='l37'>Example</span><span class='d37'>: #nop This is the start of my script file.
  1618. </span><span class='l37'>Related</span><span class='d37'>: read
  1619. <a name='PARSE'></a>
  1620. </span><span class='l32'> PARSE
  1621. </span><span class='l37'>Command</span><span class='d37'>: #parse </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1622. Like the loop statement, parse will loop from start to finish through
  1623. the given string. The value of the current character is stored in the
  1624. provided variable.
  1625. </span><span class='l37'>Example</span><span class='d37'>: #parse {hello world} {char} {#showme &dollar;char}
  1626. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, loop, repeat, return and while.
  1627. <a name='PATH'></a>
  1628. </span><span class='l32'> PATH
  1629. </span><span class='l37'>Command</span><span class='d37'>: #path </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1630. create Will clear the path and start path mapping.
  1631. delete Will delete the last move of the path.
  1632. describe Describe the path and current position.
  1633. destroy Will clear the path and stop path mapping.
  1634. goto Go the the start, end, or given position index.
  1635. insert Add the given argument to the path.
  1636. load Load the given variable as the new path.
  1637. map Display the map and the current position.
  1638. move Move the position forward or backward. If a number is given
  1639. the position is changed by the given number of steps.
  1640. run Execute the current path, with an optional floating point
  1641. delay in seconds as the second argument.
  1642. save Save the path to a variable. You must specify whether you
  1643. want to save the path 'forward' or 'backward'. If you use
  1644. the 'length' or 'position' keywords the current length or
  1645. position is saved.
  1646. swap Switch the forward and backward path.
  1647. unzip Load the given speedwalk as the new path.
  1648. walk Take one step forward or backward.
  1649. zip Turn the path into a speedwalk.
  1650. </span><span class='l37'>Example</span><span class='d37'>: #path ins {unlock n;open n} {unlock s;open s}
  1651. </span><span class='l37'>Related</span><span class='d37'>: map and pathdir.
  1652. <a name='PATHDIR'></a>
  1653. </span><span class='l32'> PATHDIR
  1654. </span><span class='l37'>Command</span><span class='d37'>: #pathdir </span><span class='l37'>{</span><span class='d37'>dir</span><span class='l37'>} {</span><span class='d37'>reversed dir</span><span class='l37'>} {</span><span class='d37'>coord</span><span class='l37'>}</span><span class='d37'>
  1655. By default tintin sets the most commonly used movement commands
  1656. meaning you generally don't really have to bother with pathdirs.
  1657. Pathdirs are used by the #path and #map commands.
  1658. The first argument is a direction, the second argument is the reversed
  1659. direction. The reverse direction of north is south, etc.
  1660. The third argument is a spatial coordinate which is a power of two.
  1661. 'n' is 1, 'e' is 2, 's' is 4, 'w' is '8', 'u' is 16, 'd' is 32. The
  1662. exception is for compound directions, whose value should be the sum
  1663. of the values of each cardinal direction it is composed of. For
  1664. example, 'nw' is the sum of 'n' and 'w' which is 1 + 8, so 'nw'
  1665. needs to be given the value of 9. This value is required for the
  1666. #map functionality to work properly.
  1667. </span><span class='l37'>Example</span><span class='d37'>: #pathdir {ue} {dw} {18}
  1668. #pathdir {dw} {ue} {40}
  1669. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a pathdir with the #unpathdir command.
  1670. </span><span class='l37'>Related</span><span class='d37'>: map and path.
  1671. <a name='PCRE'></a>
  1672. </span><span class='l32'> PCRE
  1673. </span><span class='d37'>
  1674. A regular expression, regex or regexp is a sequence of characters that
  1675. defines a search pattern. Since the 1980s, different syntaxes for
  1676. writing regular expressions exist, the two most widely used ones being
  1677. the POSIX syntax and the similar but more advanced Perl standard.
  1678. TinTin++ supports the Perl standard known as PCRE (Perl Compatible
  1679. Regular Expressions).
  1680. Regular expressions are an integral part of TinTin++, but keep in mind
  1681. that tintin doesn't allow you to use regular expressions directly,
  1682. instead it uses a simpler intermediate syntax that still allows more
  1683. complex expressions when needed.
  1684. Commands that utilize regular expressions are: action, alias, elseif,
  1685. gag, grep, highlight, if, kill, local, math, prompt, regexp, replace,
  1686. substitute, switch, variable and while. Several other commands use
  1687. regular expressions in minor ways. Fortunately the basics are very
  1688. easy to learn.
  1689. </span><span class='l37'> TinTin++ Regular Expression</span><span class='d37'>
  1690. The following support is available for regular expressions.
  1691. ^ match start of line.
  1692. &dollar; match of end of line.
  1693. &bsol; escape one character.
  1694. %1-%99 match of any text, stored in the corresponding index.
  1695. %0 should be avoided in the regex, contains all matched text.
  1696. { } embed a perl compatible regular expression, matches are stored.
  1697. %!{ } embed a perc compatible regular expression, matches are not stored.
  1698. [ ] . + | ( ) ? * are treated as normal text unless used within braces. Keep in
  1699. mind that { } is replaced with ( ) automatically unless %!{ } is used.
  1700. </span><span class='l37'>
  1701. TinTin++ Description POSIX</span><span class='d37'>
  1702. %d Match zero to any number of digits ([0-9]*?)
  1703. %D Match zero to any number of non-digits ([^0-9]*?)
  1704. %i Matches become case insensitive (?i)
  1705. %I Matches become case sensitive (default) (?-i)
  1706. %s Match zero to any number of spaces ([&bsol;r&bsol;n&bsol;t ]*?)
  1707. %w Match zero to any number of word characters ([A-Za-z0-9_]*?)
  1708. %W Match zero to any number of non-word characters ([^A-Za-z0-9_]*?)
  1709. %? Match zero or one character (.??)
  1710. %. Match one character (.)
  1711. %+ Match one to any number of characters (.+?)
  1712. %* Match zero to any number of characters (.*?)
  1713. </span><span class='l37'>
  1714. Variables</span><span class='d37'>
  1715. If you use %1 in an action to perform a match the matched string is
  1716. stored in the %1 variable which can be used in the action body.
  1717. Example: %1 says 'Tickle me'} {tickle %1}
  1718. If you use %2 the match is stored in %2, etc. If you use an unnumbered
  1719. match like %* or %S the match is stored at the last used index
  1720. incremented by one.
  1721. Example: %3 says '%*'} {#if {&quot;%4&quot; == &quot;Tickle me&quot;} {tickle %3}}
  1722. The maximum variable index is 99. If you begin an action with %* the
  1723. match is stored in %1. You should never use %0 in the trigger part of
  1724. an action, when used in the body of an action %0 contains all the parts
  1725. of the string that were matched.
  1726. To prevent a match from being stored use %!*, %!w, etc.
  1727. </span><span class='l37'>
  1728. Perl Compatible Regular Expressions</span><span class='d37'>
  1729. You can embed a PCRE (Perl Compatible Regular Expression) using curley
  1730. braces { }, these braces are replaced with parentheses ( ) unless you
  1731. use %!{ }.
  1732. </span><span class='l37'>
  1733. Or</span><span class='d37'>
  1734. You can separate alternatives within a PCRE using the | character.
  1735. Example: #act {%* raises {his|her|its} eyebrows.} {say 42..}
  1736. </span><span class='l37'>
  1737. Brackets</span><span class='d37'>
  1738. You can group alternatives and ranges within a PCRE using brackets.
  1739. Example: #act {%* says 'Who is number {[1-9]}} {say &dollar;number[%2] is number %2}
  1740. The example only triggers if someone provides a number between 1 and
  1741. 9. Any other character will cause the action to not trigger.
  1742. Example: #act {%* says 'Set password to {[^0-9]*}&dollar;} {say The password must
  1743. contain at least one number, not for security reasons, but just to
  1744. annoy you.} {4}
  1745. When the ^ character is used within brackets it creates an inverse
  1746. search, [^0-9] matches every character except for a number between 0
  1747. and 9.
  1748. </span><span class='l37'>
  1749. Quantification</span><span class='d37'>
  1750. A quantifier placed after a match specifies how often the match is
  1751. allowed to occur.
  1752. ? repeat zero or one time.
  1753. * repeat zero or multiple times.
  1754. + repeat once or multiple times.
  1755. {n} repeat exactly n times, n must be a number.
  1756. {n,} repeat at least n times, n must be a number.
  1757. {n,o} repeat between n and o times, n and o must be a number.
  1758. Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}} {Say &dollar;number[%2] is
  1759. number %2}
  1760. The example only triggers if someone provides a number between 1 and
  1761. 999.
  1762. </span><span class='l37'>Parantheses</span><span class='d37'>
  1763. TinTin Regular Expressions automatically add parenthesis, for example
  1764. %* translates to (.*?) in PCRE unless the %* is found at the start or
  1765. end of the line, in which cases it translates to (.*). Paranthesis in
  1766. PCRE causes a change in execution priority similar to mathematical
  1767. expressions, but parentheses also causes the match to be stored to a
  1768. variable.
  1769. When nesting multiple sets of parentheses each nest is assigned its
  1770. numerical variable in order of appearance.
  1771. Example: #act {%* chats '{Mu(ha)+}'} {chat %2ha!}
  1772. If someone chats Muha you will chat Muhaha! If someone chats Muhaha
  1773. you will chat Muhahaha!
  1774. </span><span class='l37'>Lazy vs Greedy</span><span class='d37'>
  1775. By default regex matches are greedy, meaning {.*} will capture as much
  1776. text as possible.
  1777. Example: #regex {bli bla blo} {^{.*} {.*}&dollar;} {#showme Arg1=(&amp;1) Arg2=(&amp;2)}
  1778. This will display: Arg1=(bli bla) Arg2=(blo)
  1779. By appending a ? behind a regex it becomes lazy, meaning {.*?} will
  1780. capture as little text as possible.
  1781. Example: #regex {bli bla blo} {^{.*?} {.*?}&dollar;} {#showme Arg1=(&amp;1) Arg2=(&amp;2)}
  1782. This will display: Arg1=(bli) Arg2=(bla blo).
  1783. </span><span class='l37'>Escape Codes</span><span class='d37'>
  1784. PCRE support the following escape codes.
  1785. </span><span class='l37'>
  1786. PCRE Description POSIX</span><span class='d37'>
  1787. &bsol;A Match start of string ^
  1788. &bsol;b Match word boundaries (^|&bsol;r|&bsol;n|&bsol;t| |&dollar;)
  1789. &bsol;B Match non-word boundaries [^&bsol;r&bsol;n&bsol;t ]
  1790. &bsol;c Insert control character &bsol;c
  1791. &bsol;d Match digits [0-9]
  1792. &bsol;D Match non-digits [^0-9]
  1793. &bsol;e Insert escape character &bsol;e
  1794. &bsol;f Insert form feed character &bsol;f
  1795. &bsol;n Insert line feed character &bsol;n
  1796. &bsol;r Insert carriage return character &bsol;r
  1797. &bsol;s Match spaces [&bsol;r&bsol;n&bsol;t ]
  1798. &bsol;S Match non-spaces [^&bsol;r&bsol;n&bsol;t ]
  1799. &bsol;t Insert tab character &bsol;t
  1800. &bsol;w Match letters, numbers, and underscores [A-Za-z0-9_]
  1801. &bsol;W Match non-letters, numbers, and underscores [^A-Za-z0-9_]
  1802. &bsol;x Insert hex character &bsol;x
  1803. &bsol;Z Match end of string &dollar;
  1804. &bsol;s matches one space, &bsol;s+ matches one or multiple spaces.
  1805. </span><span class='l37'>Color triggers</span><span class='d37'>
  1806. To make matching easier text triggers (Actions, Gags, Highlights,
  1807. Prompts, and Substitutes) have their color codes stripped. If you
  1808. want to create a color trigger you must start the triggers with a ~
  1809. (tilda). To make escape codes visible use #config {convert meta} on.
  1810. Example: #action {~&bsol;e[1;37m%1} {#var roomname %1}
  1811. If the room name is the only line on the server in bright white
  1812. white color trigger will save the roomname.
  1813. This covers the basics. PCRE has more options, most of which are
  1814. somewhat obscure, so you'll have to read a PCRE manual for additional
  1815. information.
  1816. </span><span class='l37'>Related</span><span class='d37'>: map and path.
  1817. <a name='PORT'></a>
  1818. </span><span class='l32'> PORT
  1819. </span><span class='l37'>Command</span><span class='d37'>: #port </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  1820. </span><span class='l37'>#port {init} {name} {port} {file}
  1821. </span><span class='d37'> Initilize a port session.
  1822. </span><span class='l37'>#port {call} {address} {port}
  1823. </span><span class='d37'> Connect to a remote socket.
  1824. </span><span class='l37'>#port {color} {color names}
  1825. </span><span class='d37'> Set the default color of port messages.
  1826. </span><span class='l37'>#port {dnd}
  1827. </span><span class='d37'> Do Not Disturb. Decline new connections
  1828. </span><span class='l37'>#port {group} {name} {group}
  1829. </span><span class='d37'> Assign a socket group.
  1830. </span><span class='l37'>#port {ignore} {name}
  1831. </span><span class='d37'> Ignore a socket
  1832. </span><span class='l37'>#port {info}
  1833. </span><span class='d37'> Display information about the port session.
  1834. </span><span class='l37'>#port {name} {name}
  1835. </span><span class='d37'> Change socket name.
  1836. </span><span class='l37'>#port {prefix} {text}
  1837. </span><span class='d37'> Set prefix before each message.
  1838. </span><span class='l37'>#port {send} {name|all} {text}
  1839. </span><span class='d37'> Send data to socket
  1840. </span><span class='l37'>#port {uninitialize}
  1841. </span><span class='d37'> Uninitialize the port session.
  1842. </span><span class='l37'>#port {who}
  1843. </span><span class='d37'> Show all connections
  1844. </span><span class='l37'>#port {zap} {name}
  1845. </span><span class='d37'> Close a connection
  1846. The port command is very similar to chat except that it creates a
  1847. new session dedicated to receiving socket connections at the given
  1848. port number without built-in support for a communication protocol.
  1849. You can init with 0 as the port number to create a dummy session.
  1850. </span><span class='l37'>Related</span><span class='d37'>: all, chat, run, session, sessionname, snoop, ssl and zap.
  1851. <a name='PROMPT'></a>
  1852. </span><span class='l32'> PROMPT
  1853. </span><span class='l37'>Command</span><span class='d37'>: #prompt </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>} {</span><span class='d37'>new text</span><span class='l37'>} {</span><span class='d37'>row #</span><span class='l37'>} {</span><span class='d37'>col #</span><span class='l37'>}</span><span class='d37'>
  1854. Prompt is a feature for split window mode, which will capture a line
  1855. received from the server and display it on the status bar of your
  1856. split screen terminal. You would define &lt;text&gt; and &lt;new text&gt; the
  1857. same way as with a substitution.
  1858. The row number is optional and useful if you use a non standard split
  1859. mode. A positive row number draws #row lines from the top while a
  1860. negative number draws #row lines from the bottom. Without an argument
  1861. #prompt will write to the default split line, which is at row -2.
  1862. The col number is optional and can be used to set the column index.
  1863. A positive col number draws the given number of columns from the left,
  1864. while a negative col number draws from the right. If you leave the
  1865. column argument empty tintin will clear the row before printing at
  1866. the start of the row.
  1867. The #showme command takes a row and col argument as well so it's also
  1868. possible to place text on your split lines using #showme.
  1869. </span><span class='l37'>Comment</span><span class='d37'>: See </span><span class='l37'>#help split</span><span class='d37'> for more information on split mode.
  1870. </span><span class='l37'>Comment</span><span class='d37'>: See </span><span class='l37'>#help substitute</span><span class='d37'> for more information on text
  1871. substitutions.
  1872. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a prompt with the #unprompt command.
  1873. </span><span class='l37'>Related</span><span class='d37'>: action, gag, highlight and substitute.
  1874. <a name='READ'></a>
  1875. </span><span class='l32'> READ
  1876. </span><span class='l37'>Command</span><span class='d37'>: #read </span><span class='l37'>{</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'>
  1877. Reads a commands file into memory. The coms file is merged in with
  1878. the currently loaded commands. Duplicate commands are overwritten.
  1879. If you uses braces, { and } you can use several lines for 1 commands.
  1880. This however means you must always match every { with a } for the read
  1881. command to work.
  1882. You can comment out triggers using /* text */
  1883. </span><span class='l37'>Related</span><span class='d37'>: log, scan, textin and write.
  1884. <a name='REGEXP'></a>
  1885. </span><span class='l32'> REGEXP
  1886. </span><span class='l37'>Command</span><span class='d37'>: #regexp </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>expression</span><span class='l37'>} {</span><span class='d37'>true</span><span class='l37'>} {</span><span class='d37'>false</span><span class='l37'>}</span><span class='d37'>
  1887. Compares the string to the given regular expression.
  1888. Variables are stored in &amp;1 to &amp;99 with &amp;0 holding the matched substring.
  1889. ^ force match of start of line.
  1890. &dollar; force match of end of line.
  1891. &bsol; escape one character.
  1892. %1-%99 lazy match of any text, available at %1-%99.
  1893. %0 should be avoided in triggers, and if left alone lists all matches.
  1894. { } embed a raw regular expression, matches are stored to %1-%99.
  1895. %!{ } embed a raw regular expression, matches are not stored.
  1896. [ ] . + | ( ) ? * are treated as normal text unlessed used within
  1897. braces. Keep in mind that { } is replaced with ( ) automatically
  1898. unless %!{ } is used.
  1899. Of the following the (lazy) match is available at %1-%99 + 1
  1900. %a match zero to any number of characters except newlines.
  1901. %A match zero to any number of newlines.
  1902. %d match zero to any number of digits.
  1903. %D match zero to any number of non digits.
  1904. %p match zero to any number of printable characters.
  1905. %P match zero to any number of non printable characters.
  1906. %s match zero to any number of spaces.
  1907. %S match zero to any number of non spaces.
  1908. %u match zero to any number of unicode characters.
  1909. %U match zero to any number of non unicode characters.
  1910. %w match zero to any number of word characters.
  1911. %W match zero to any number of non word characters.
  1912. If you want to match 1 digit use %+1d, if you want to match between 3
  1913. and 5 spaces use %+3..5s, if you want to match between 0 and 1 word
  1914. characters use %+0..1w
  1915. %+ match one to any number of characters.
  1916. %? match zero or one character.
  1917. %. match one character.
  1918. %* match zero to any number of characters.
  1919. %i matching becomes case insensitive.
  1920. %I matching becomes case sensitive (default).
  1921. The match is automatically stored to a value between %1 and %99
  1922. starting at %1 and incrementing by 1 for every regex. If you use
  1923. %15 as a regular expression, the next unnumbered regular expression
  1924. would be %16. To prevent a match from being stored use %!*, %!w, etc.
  1925. </span><span class='l37'>Example</span><span class='d37'>: #regexp {bli bla blo} {bli {.*} blo} {#showme &amp;1}
  1926. </span><span class='l37'>Related</span><span class='d37'>: case, default, else, elseif, if and switch.
  1927. <a name='REPEAT'></a>
  1928. </span><span class='l32'> REPEAT
  1929. </span><span class='l37'>Command</span><span class='d37'>: #</span><span class='l37'>[</span></span><span class='b49'><span class='d37'>number</span><span class='l37'>] {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  1930. Sometimes you want to repeat the same command multiple times. This is the
  1931. easiest way to accomplish that.
  1932. </span><span class='l37'>Example</span><span class='d37'>: #10 {buy bread}
  1933. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, loop, parse, return and while.
  1934. <a name='REPLACE'></a>
  1935. </span><span class='l32'> REPLACE
  1936. </span><span class='l37'>Command</span><span class='d37'>: #replace </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>oldtext</span><span class='l37'>} {</span><span class='d37'>newtext</span><span class='l37'>}</span><span class='d37'>
  1937. Searches the variable text replacing each occurrence of 'oldtext' with
  1938. 'newtext'.
  1939. </span><span class='l37'>Related</span><span class='d37'>: cat, format, function, local, math, script and variable.
  1940. <a name='RETURN'></a>
  1941. </span><span class='l32'> RETURN
  1942. </span><span class='l37'>Command</span><span class='d37'>: #return </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>}</span><span class='d37'>
  1943. This command can be used to break out of a command string being
  1944. executed.
  1945. If used inside a #function you can use #return with an argument to both
  1946. break out of the function and set the result variable.
  1947. </span><span class='l37'>Related</span><span class='d37'>: break, continue, foreach, list, loop, parse, repeat and while.
  1948. <a name='RUN'></a>
  1949. </span><span class='l32'> RUN
  1950. </span><span class='l37'>Command</span><span class='d37'>: #run </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>shell command</span><span class='l37'>} {</span><span class='d37'>file</span><span class='l37'>}</span><span class='d37'>
  1951. The run command works much like the system command except that it
  1952. runs the command in a pseudo terminal. The run command also creates
  1953. a session that treats the given shell command as a server. This
  1954. allows you to run ssh, as well as any other shell application, with
  1955. full tintin scripting capabilities. If a file name is given the file
  1956. is loaded prior to execution.
  1957. </span><span class='l37'>Example</span><span class='d37'>: #run {somewhere} {ssh someone@somewhere.com}
  1958. </span><span class='l37'>Example</span><span class='d37'>: #run {something} {tail -f chats.log}
  1959. </span><span class='l37'>Related</span><span class='d37'>: all, port, session, sessionname, snoop, ssl and zap.
  1960. <a name='SCAN'></a>
  1961. </span><span class='l32'> SCAN
  1962. </span><span class='l37'>Command</span><span class='d37'>: #scan </span><span class='l37'>{</span><span class='d37'>abort</span><span class='l37'>|</span><span class='d37'>csv</span><span class='l37'>|</span><span class='d37'>tsv</span><span class='l37'>|</span><span class='d37'>txt</span><span class='l37'>} {</span><span class='d37'>filename</span><span class='l37'>}</span><span class='d37'>
  1963. The scan command is a file loading utility.
  1964. </span><span class='l37'>#scan {abort}
  1965. </span><span class='d37'> This command must be called from with a SCAN event and will
  1966. abort the scan if one is in progress.
  1967. </span><span class='l37'>#scan {csv} &lt;filename&gt;
  1968. </span><span class='d37'> The scan csv command reads in a comma separated value file
  1969. without printing the content to the screen. Instead it triggers one
  1970. of two events.
  1971. The SCAN CSV HEADER event is triggered on the first line of the csv
  1972. file. The SCAN CSV LINE event is triggered on the second and each
  1973. subsequent line of the csv file. The %0 argument contains the entire
  1974. line, with %1 containing the first value, %2 the second value, etc,
  1975. all the way up to %99.
  1976. Values containing spaces must be surrounded with quotes, keep in mind
  1977. newlines within quotes are not supported. Use two quotes to print one
  1978. literal quote character.
  1979. </span><span class='l37'>#scan {tsv} &lt;filename&gt;
  1980. </span><span class='d37'> The scan tsv &lt;filename&gt; command reads in a tab separated value file
  1981. without printing the content to the screen. Instead it triggers the
  1982. SCAN TSV HEADER event for the first line and SCAN TSV LINE for all
  1983. subsequent lines.
  1984. </span><span class='l37'>#scan {file} &lt;filename&gt; {commands}
  1985. </span><span class='d37'> The scan file command reads the given files and executes the
  1986. commands argument. &amp;0 contains the raw content of the file and
  1987. &amp;1 contains the plain content. &amp;2 contains the raw byte size of the
  1988. file and &amp;3 the plain byte size. &amp;5 contains the line count.
  1989. </span><span class='l37'>#scan {txt} &lt;filename&gt;
  1990. </span><span class='d37'> The scan txt &lt;filename&gt; command reads in a file and sends its content
  1991. to the screen as if it was send by a server. After using scan you can
  1992. use page-up and down to view the file.
  1993. This command is useful to convert ansi color files to html or viewing
  1994. raw log files.
  1995. Actions, highlights, and substitutions will trigger as normal, and it
  1996. is possible to create an action to execute #scan abort to prematurely
  1997. stop the scan.
  1998. </span><span class='l37'>Related</span><span class='d37'>: read and textin.
  1999. <a name='SCREEN'></a>
  2000. </span><span class='l32'> SCREEN
  2001. </span><span class='l37'>Command</span><span class='d37'>: #screen </span><span class='l37'>{</span><span class='d37'>option</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}
  2002. </span><span class='d37'>The screen command offers a variety of screen manipulation
  2003. commands and utilities.
  2004. </span><span class='l37'>#screen blur
  2005. </span><span class='d37'> Move the terminal to the back of the stack.
  2006. </span><span class='l37'>#screen clear [all|scroll region|square] &lt;args&gt;
  2007. </span><span class='d37'> Provide 4 arguments defining the top left and bottom right corner
  2008. when erasing a square.
  2009. </span><span class='l37'>#screen focus
  2010. </span><span class='d37'> Move the terminal to the front of the stack.
  2011. </span><span class='l37'>#screen fullscreen [on|off]
  2012. </span><span class='d37'> Toggles fullscreen mode when used without an argument.
  2013. </span><span class='l37'>#screen get &lt;rows|cols|height|width&gt; &lt;var&gt;
  2014. </span><span class='d37'> Get the rows/cols size in characters or height/width in pixels.
  2015. </span><span class='l37'>#screen get &lt;top_row|bot_row|top_split|bot_split&gt; &lt;var&gt;
  2016. </span><span class='d37'> Get the top and bot row of the scrolling region or the height
  2017. of the top and bot split bars.
  2018. </span><span class='l37'>#screen info
  2019. </span><span class='d37'> Debugging information.
  2020. </span><span class='l37'>#screen load &lt;both|label|title&gt;
  2021. </span><span class='d37'> Reload the saved title, label, or both.
  2022. </span><span class='l37'>#screen minimize &lt;on|off&gt;
  2023. </span><span class='d37'> Minimize with on, restore with off.
  2024. </span><span class='l37'>#screen maximize [on|off]
  2025. </span><span class='d37'> Maximize with on, restore with off.
  2026. </span><span class='l37'>#screen move &lt;height&gt; &lt;width&gt;
  2027. </span><span class='d37'> Move the upper left corner of the terminal to pixel coordinate.
  2028. </span><span class='l37'>#screen raise &lt;event&gt;
  2029. </span><span class='d37'> This will raise several screen events with %1 and %2 arguments.
  2030. </span><span class='l37'>#screen refresh
  2031. </span><span class='d37'> Terminal dependant, may do nothing.
  2032. </span><span class='l37'>#screen rescale &lt;height&gt; &lt;width&gt;
  2033. </span><span class='d37'> Resize the screen to the given height and width in pixels.
  2034. </span><span class='l37'>#screen resize &lt;rows&gt; &lt;cols&gt;
  2035. </span><span class='d37'> Resize the screen to the given height and width in characters.
  2036. </span><span class='l37'>#screen save &lt;both|label|title&gt;
  2037. </span><span class='d37'> Save the title, label, or both.
  2038. </span><span class='l37'>#screen set &lt;both|label|title&gt;
  2039. </span><span class='d37'> Set the title, label, or both. Only title works on Windows.
  2040. </span><span class='l37'>Related</span><span class='d37'>: bell
  2041. <a name='SCREEN READER'></a>
  2042. </span><span class='l32'> SCREEN READER
  2043. </span><span class='l37'>Command</span><span class='d37'>: #config </span><span class='l37'>{</span><span class='d37'>SCREEN READER</span><span class='l37'>} {</span><span class='d37'>ON|OFF</span><span class='l37'>}</span><span class='d37'>
  2044. Screen reader mode is enabled by using #config screen on. The main
  2045. purpose of the screen reader mode is to report to servers that a
  2046. screen reader is being used by utilizing the MTTS standard. The MTTS
  2047. specification is available at:
  2048. http://tintin.sourceforge.net/protocols/mtts
  2049. With the screen reader mode enabled TinTin++ will try to remove visual
  2050. elements where possible.
  2051. </span><span class='l37'>Related</span><span class='d37'>: config
  2052. <a name='SCRIPT'></a>
  2053. </span><span class='l32'> SCRIPT
  2054. </span><span class='l37'>Command</span><span class='d37'>: #script </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>shell command</span><span class='l37'>}</span><span class='d37'>
  2055. The script command works much like the system command except that it
  2056. treats the generated echos as commands if no variable is provided.
  2057. This is useful for running php, perl, ruby, and python scripts. You
  2058. can run these scrips either from file or from within tintin if the
  2059. scripting language allows this.
  2060. If you provide a variable the output of the script is stored as a list.
  2061. </span><span class='l37'>Example</span><span class='d37'>: #script {ruby -e 'print &quot;#showme hello world&quot;'}
  2062. </span><span class='l37'>Example</span><span class='d37'>: #script {python -c 'print &quot;#showme hello world&quot;'}
  2063. </span><span class='l37'>Example</span><span class='d37'>: #script {php -r 'echo &quot;#showme hello world&quot;'}
  2064. </span><span class='l37'>Example</span><span class='d37'>: #script {path} {pwd};#showme The path is &dollar;path[1].
  2065. </span><span class='l37'>Related</span><span class='d37'>: format, function, local, math, replace and variable.
  2066. <a name='SEND'></a>
  2067. </span><span class='l32'> SEND
  2068. </span><span class='l37'>Command</span><span class='d37'>: #send </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>}</span><span class='d37'>
  2069. Sends the text directly to the server, useful if you want to start
  2070. with an escape code.
  2071. </span><span class='l37'>Related</span><span class='d37'>: textin
  2072. <a name='SESSION'></a>
  2073. </span><span class='l32'> SESSION
  2074. </span><span class='l37'>Command</span><span class='d37'>: #session </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>host</span><span class='l37'>} {</span><span class='d37'>port</span><span class='l37'>} {</span><span class='d37'>file</span><span class='l37'>}</span><span class='d37'>
  2075. Starts a telnet session with the given name, host, port, and optional
  2076. file name. The name can be anything you want, except the name of an
  2077. already existant session, a number, or the keywords '+', '-' and 'self'.
  2078. If a file name is given the file is only read if the session succesfully
  2079. connects.
  2080. Without an argument #session shows the currently defined sessions.
  2081. If you have more than one session, you can use the following commands:
  2082. #session {-} Switch to the previous session.
  2083. #session {+} Switch to the next session.
  2084. #session {&lt;number&gt;} Switch to the given session. Session 0 is the
  2085. startup session, +1 the first, +2 the second, and
  2086. -1 is the last session. Sessions are (currently)
  2087. sorted in order of creation.
  2088. #gts Switch to the startup session. The name gts stands
  2089. for global tintin session.
  2090. #ats Switch to the active session. The name ats stands
  2091. for active tintin session.
  2092. not necessarily the calling session.
  2093. #{name} Activates to the session with the given name.
  2094. #{name} {command}: Executes a command with the given session without
  2095. changing the active session.
  2096. @&lt;name&gt;{text}: Parse text in the given session, substituting the
  2097. variables and functions, and print the result in
  2098. the current active session.
  2099. The startup session is named 'gts' and can be used for relog scripts. Do
  2100. keep in mind that tickers do not work in the startup session.
  2101. </span><span class='l37'>Example</span><span class='d37'>: #event {SESSION DISCONNECTED} {#gts #delay 10 #ses %0 tintin.net 4321}
  2102. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, sessionname, snoop, ssl and zap.
  2103. <a name='SESSIONNAME'></a>
  2104. </span><span class='l32'> SESSIONNAME
  2105. </span><span class='l37'>Syntax</span><span class='d37'>: #[sessionname] </span><span class='l37'>{</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  2106. You can create multiple sessions with the #session command. By default only one
  2107. session is active, meaning commands you input are executed in the active
  2108. session. While all sessions receive output, only output sent to the active
  2109. session is displayed.
  2110. When you create a session with the #session command you must specify a session
  2111. name, the session name, prepended with a hashtag, can be used to activate the
  2112. session when used without an argument. If an argument is given it will be
  2113. executed by that session as a command, the session will not be activated.
  2114. </span><span class='l37'>Example</span><span class='d37'>: #ses one tintin.net 23;#ses two tintin.net 23;#one;#two grin
  2115. This will create two sessions, the session that was created last (two in this
  2116. case) will be automatically activated upon creation. Using #one, session one is
  2117. activated. Using #two grin, the grin social will be executed by session two,
  2118. session one will remain the active session.
  2119. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, session, snoop, ssl and zap.
  2120. <a name='SHOWME'></a>
  2121. </span><span class='l32'> SHOWME
  2122. </span><span class='l37'>Command</span><span class='d37'>: #showme </span><span class='l37'>{</span><span class='d37'>string</span><span class='l37'>} {</span><span class='d37'>row</span><span class='l37'>} {</span><span class='d37'>col</span><span class='l37'>}</span><span class='d37'>
  2123. Display the string to the terminal, do not send to the server. Useful
  2124. for status, warnings, etc. The {row} and col number are optional and
  2125. work the same way as the row number of the #prompt trigger.
  2126. Actions can be triggered by the showme command. If you want to avoid
  2127. this from happening use: #line ignore #showme {&lt;string&gt;}.
  2128. </span><span class='l37'>Example</span><span class='d37'>: #tick {TICK} {#delay 50 #showme 10 SECONDS TO TICK!!!} {60}
  2129. </span><span class='l37'>Comment</span><span class='d37'>: The #prompt helpfile contains more information on using the
  2130. option {row} and {col} arguments.
  2131. </span><span class='l37'>Related</span><span class='d37'>: buffer, draw, echo and grep.
  2132. <a name='SNOOP'></a>
  2133. </span><span class='l32'> SNOOP
  2134. </span><span class='l37'>Command</span><span class='d37'>: #snoop </span><span class='l37'>{</span><span class='d37'>session name</span><span class='l37'>} {</span><span class='d37'>on</span><span class='l37'>|</span><span class='d37'>off</span><span class='l37'>}</span><span class='d37'>
  2135. If there are multiple sessions active, this command allows you to monitor
  2136. what is going on in the sessions that are not currently active. The
  2137. line of text from other sessions will be prefixed by the session's name.
  2138. You can toggle off snoop mode by executing #snoop a second time.
  2139. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, session, sessionname, ssl and zap.
  2140. <a name='SPEEDWALK'></a>
  2141. </span><span class='l32'> SPEEDWALK
  2142. </span><span class='d37'>Speedwalking allows you to enter multiple directions without using
  2143. semicolons. Directions should be prefixed with a number and will be
  2144. executed the given number of times.
  2145. You can enable speedwalking with #CONFIG {SPEEDWALK} {ON}.
  2146. </span><span class='l37'>Example</span><span class='d37'>: Without speedwalk, you have to type:
  2147. s;s;w;w;w;w;w;s;s;s;w;w;w;n;n;w
  2148. With speedwalk, you only have to type:
  2149. 2s5w3s3w2n1w
  2150. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, history, keypad, macro and tab.
  2151. <a name='SPLIT'></a>
  2152. </span><span class='l32'> SPLIT
  2153. </span><span class='l37'>Command</span><span class='d37'>: #split </span><span class='l37'>{</span><span class='d37'>top bar</span><span class='l37'>} {</span><span class='d37'>bottom bar</span><span class='l37'>}
  2154. Command</span><span class='d37'>: #split </span><span class='l37'>{</span><span class='d37'>&lt;square&gt;</span><span class='l37'>}
  2155. This option requires for your terminal to support VT100 emulation.
  2156. #split allows the creation of a top status bar, a scrolling region, a
  2157. bottom status bar, and an input line.
  2158. --top status bar--------
  2159. </span><span class='d37'> scrolling region
  2160. </span><span class='l37'>--bottom status bar----------
  2161. </span><span class='d37'> input line
  2162. By default the bottom status bar is filled with dashes --- and
  2163. subsequently it is also known as the split line. The scrolling
  2164. region is also known as the main screen and this is where all
  2165. incoming text is displayed by default.
  2166. If you use #split without an argument it will set the height of the
  2167. top status bar to 0 lines and the bottom status bar to 1 line.
  2168. If you use #split with one argument it will set the height of the top
  2169. status bar to the given number of lines and the bottom status bar will
  2170. be set to 1 line.
  2171. If you use two arguments the first argument is the height of the top
  2172. status bar and the second argument the height of the bottom status bar.
  2173. The third and fourth argument are optional and tintin will interpret
  2174. four arguments as a square argument existing of two coordinates
  2175. defining the upper left corner and bottom right corner of the
  2176. scrolling region.
  2177. </span><span class='l37'>Example</span><span class='d37'>: #split 0 0
  2178. This will create a split screen with just a scrolling regino and an
  2179. input line. Great for the minimalist.
  2180. </span><span class='l37'>Comment</span><span class='d37'>: You can display text on the split line(s) with the #prompt and
  2181. #showme {line} {row} commands.
  2182. </span><span class='l37'>Comment</span><span class='d37'>: You can remove split mode with the #unsplit command.
  2183. </span><span class='l37'>Related</span><span class='d37'>: echo, prompt and showme.
  2184. <a name='SSL'></a>
  2185. </span><span class='l32'> SSL
  2186. </span><span class='l37'>Command</span><span class='d37'>: #ssl </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>host</span><span class='l37'>} {</span><span class='d37'>port</span><span class='l37'>} {</span><span class='d37'>file</span><span class='l37'>}
  2187. Starts a secure socket telnet session with the given name, host, port,
  2188. and optional file name.
  2189. Related</span><span class='d37'>: all, port, run, sessionname, snoop, ssl and zap.
  2190. <a name='STATEMENTS'></a>
  2191. </span><span class='l32'> STATEMENTS
  2192. TinTin++ knows the following statements.
  2193. </span><span class='d37'>
  2194. #break
  2195. #case {value} {true}
  2196. #continue
  2197. #default {commands}
  2198. #else {commands}
  2199. #elseif {expression} {true}
  2200. #foreach {list} {variable} {commands}
  2201. #if {expression} {true}
  2202. #loop {min} {max} {variable} {commands}
  2203. #parse {string} {variable} {commands}
  2204. #return {value}
  2205. #switch {expression} {commands}
  2206. #while {expression} {commands}
  2207. </span><span class='l37'>Related</span><span class='d37'>: commands, help and info.
  2208. <a name='SUBSTITUTE'></a>
  2209. </span><span class='l32'> SUBSTITUTE
  2210. </span><span class='l37'>Command</span><span class='d37'>: #substitute </span><span class='l37'>{</span><span class='d37'>text</span><span class='l37'>} {</span><span class='d37'>new text</span><span class='l37'>} {</span><span class='d37'>priority</span><span class='l37'>}</span><span class='d37'>
  2211. Allows you to replace text from the server with the new text.
  2212. This is helpful for complex coloring and making things more readable.
  2213. The %1-%99 variables can be used to capture text and use it as part of
  2214. the new output, and the ^ char is valid to only check the beginning of
  2215. the line for the text specified.
  2216. If only one argument is given, all active substitutions that match the
  2217. strings are displayed. The '%*' char is valid in this instance. See
  2218. '#help regex', for advanced wildcard information.
  2219. If no argument is given, all subs are displayed.
  2220. </span><span class='l37'>Example</span><span class='d37'>: #sub {Zoe} {ZOE}
  2221. Any instance of Zoe will be replaced with ZOE.
  2222. </span><span class='l37'>Example</span><span class='d37'>: #sub {~&bsol;e[0;34m} {&bsol;e[1;34m}
  2223. Replace generic dark blue color codes with bright blue ones.
  2224. </span><span class='l37'>Example</span><span class='d37'>: #sub {%1massacres%2} {&lt;018&gt;%1&lt;118&gt;MASSACRES&lt;018&gt;%2}
  2225. Replaces all occurrences of 'massacres' with 'MASSACRES' in red.
  2226. </span><span class='l37'>Comment</span><span class='d37'>: See '#help action', for more information about triggers.
  2227. </span><span class='l37'>Comment</span><span class='d37'>: See '#help colors', for more information.
  2228. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a substitution with the #unsubstitute command.
  2229. </span><span class='l37'>Related</span><span class='d37'>: action, gag, highlight and prompt.
  2230. <a name='SUSPEND'></a>
  2231. </span><span class='l32'> SUSPEND
  2232. </span><span class='l37'>Command</span><span class='d37'>: #cursor suspend
  2233. Temporarily suspends tintin and returns you to your shell. To
  2234. return to tintin, type 'fg' at the shell prompt.
  2235. While suspended your tintin sessions will freeze. To keep a
  2236. suspended session running use the #detach command.
  2237. </span><span class='l37'>Related</span><span class='d37'>: end
  2238. <a name='SWITCH'></a>
  2239. </span><span class='l32'> SWITCH
  2240. </span><span class='l37'>Command</span><span class='d37'>: #switch </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>arguments</span><span class='l37'>}</span><span class='d37'>
  2241. The switch command works similar to the switch statement in other
  2242. languages. When the 'switch' command is encountered its body is parsed
  2243. and each 'case' command found will be compared to the conditional
  2244. argument of the switch and executed if there is a match.
  2245. When comparing strings the switch and case arguments must be enclosed
  2246. in quote characters.
  2247. If the 'default' command is found and no 'case' statement has been
  2248. matched the default command's argument is executed.
  2249. </span><span class='l37'>Example</span><span class='d37'>: #switch {1d4} {#case 1 cackle;#case 2 smile;#default giggle}
  2250. </span><span class='l37'>Related</span><span class='d37'>: statements
  2251. <a name='SYSTEM'></a>
  2252. </span><span class='l32'> SYSTEM
  2253. </span><span class='l37'>Command</span><span class='d37'>: #system </span><span class='l37'>{</span><span class='d37'>command</span><span class='l37'>}</span><span class='d37'>
  2254. Executes the command specified as a shell command.
  2255. </span><span class='l37'>Related</span><span class='d37'>: detach, script and run.
  2256. <a name='TAB'></a>
  2257. </span><span class='l32'> TAB
  2258. </span><span class='l37'>Command</span><span class='d37'>: #tab </span><span class='l37'>{</span><span class='d37'>word</span><span class='l37'>}</span><span class='d37'>
  2259. Adds a word to the tab completion list, alphabetically sorted.
  2260. If no tabs are defined tintin will use the scrollback buffer
  2261. for auto tab completion.
  2262. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a tab with the #untab command.
  2263. </span><span class='l37'>Related</span><span class='d37'>: alias, cursor, history, keypad, macro and speedwalk.
  2264. <a name='TEXTIN'></a>
  2265. </span><span class='l32'> TEXTIN
  2266. </span><span class='l37'>Command</span><span class='d37'>: #textin </span><span class='l37'>{</span><span class='d37'>filename</span><span class='l37'>} {</span><span class='d37'>delay</span><span class='l37'>}</span><span class='d37'>
  2267. Textin allows the user to read in a file, and send its contents
  2268. directly to the server. Useful for doing online creation, or message
  2269. writing.
  2270. The delay is in seconds and takes a floating point number which is
  2271. cumulatively applied to each outgoing line.
  2272. </span><span class='l37'>Related</span><span class='d37'>: scan and send.
  2273. <a name='TICKER'></a>
  2274. </span><span class='l32'> TICKER
  2275. </span><span class='l37'>Command</span><span class='d37'>: #ticker </span><span class='l37'>{</span><span class='d37'>name</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>} {</span><span class='d37'>interval in seconds</span><span class='l37'>}</span><span class='d37'>
  2276. Executes given command every # of seconds.
  2277. </span><span class='l37'>Comment</span><span class='d37'>: Tickers don't work in the startup session.
  2278. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a ticker with the #unticker command.
  2279. </span><span class='l37'>Related</span><span class='d37'>: delay and event.
  2280. <a name='TIME'></a>
  2281. </span><span class='l32'> TIME
  2282. </span><span class='l37'>Command</span><span class='d37'>: #format </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>%t</span><span class='l37'>} {</span><span class='d37'>argument</span><span class='l37'>}</span><span class='d37'>
  2283. The %t format specifier of the #format command allows printing dates
  2284. using the strftime() format specifiers. By default the time stamp used
  2285. is the current time, if you want to print a past or future date use:
  2286. </span><span class='l37'>Command</span><span class='d37'>: #format </span><span class='l37'>{</span><span class='d37'>variable</span><span class='l37'>} {</span><span class='d37'>%t</span><span class='l37'>} {{</span><span class='d37'>argument</span><span class='l37'>} {{</span><span class='d37'>epoch time</span><span class='l37'>}}</span><span class='d37'>
  2287. The current epoch time value is obtained using #format {time} {%T}.
  2288. When using %t the argument should contain strftime format specifiers.
  2289. The output may differ depending on your locale.
  2290. %a Abbreviated name of the day of the week (mon ... sun).
  2291. %A Full name of the day of the week. (Monday ... Sunday)
  2292. %b Abbreviated name of the month (Jan ... Dec)
  2293. %B Full name of the month. (January ... December)
  2294. %C 2 digit numeric century. (19 ... 20)
  2295. %d 2 digit numeric day of the month (01 ... 31)
  2296. %H 2 digit numeric 24-hour clock hour. (00 ... 23)
  2297. %I 2 digit numeric 12-hour clock hour. (01 ... 12)
  2298. %j 3 digit numeric day of the year (001 ... 366)
  2299. %m 2 digit numeric month of the year (01 ... 12)
  2300. %M 2 digit numeric minute of the hour (00 ... 59)
  2301. %p Abbreviated 12 hour clock period (AM ... PM)
  2302. %P Abbreviated 12 hour clock period (am ... pm)
  2303. %S 2 digit numeric second of the minute (00 ...59
  2304. %u 1 digit numeric day of the week (1 ... 7)
  2305. %U 2 digit numeric Sunday week of the year (00 ... 53
  2306. %w 1 digit numeric day of the week (0 ... 6)
  2307. %W 2 digit numeric Monday week of the year (00 ... 53
  2308. %y 2 digit numeric year. (70 ... 38)
  2309. %Y 4 digit numeric year. (1970 ... 2038)
  2310. %z 5 digit timezone offset. (-1200 ... +1400)
  2311. %Z Abbreviated name of the time zone.
  2312. </span><span class='l37'>Related</span><span class='d37'>: echo and format.
  2313. <a name='VARIABLE'></a>
  2314. </span><span class='l32'> VARIABLE
  2315. </span><span class='l37'>Command</span><span class='d37'>: #variable </span><span class='l37'>{</span><span class='d37'>variable name</span><span class='l37'>} {</span><span class='d37'>text to fill variable</span><span class='l37'>}</span><span class='d37'>
  2316. Variables differ from the %0-99 arguments in the fact that you can
  2317. specify a full word as a variable, and they stay in memory for the
  2318. full session unless they are changed. They can be saved in the
  2319. coms file, and can be set to different values if you have two or
  2320. more sessions running at the same time. Variables are global for
  2321. each session and can be accessed by adding a &dollar; before the variable
  2322. name.
  2323. </span><span class='l37'>Example</span><span class='d37'>: #alias {target} {#var target %0}
  2324. #alias {x} {kick &dollar;target}
  2325. The name of a variable must exist of only letters, numbers and
  2326. underscores in order to be substituted. If you do not meet these
  2327. requirements do not panic, simply encapsulate the variable in braces:
  2328. </span><span class='l37'>Example</span><span class='d37'>: #variable {cool website} {http://tintin.sourceforge.net}
  2329. #chat I was on &dollar;{cool website} yesterday!.
  2330. Variables can be nested using brackets or dots:
  2331. </span><span class='l37'>Example</span><span class='d37'>: #var hp[self] 34;#var hp[target] 46
  2332. You can see the first nest of a variable using &dollar;variable[+1] and the
  2333. last nest using &dollar;variable[-1]. Using &dollar;variable[-2] will report the
  2334. second last variable, and so on. To show all indices use &dollar;variable[].
  2335. To show all values use &dollar;variable[%*] or a less generic regex.
  2336. Nested variables are also known as tables, table generally being used
  2337. to refer to several variables nested within one specific variable.
  2338. </span><span class='l37'>Example</span><span class='d37'>: #showme {Targets starting with the letter A: &dollar;targets[A%*]
  2339. To see the internal index of a variable use &amp;&lt;variable name&gt;. To see
  2340. the size of a table you would use: &amp;targets[] or &amp;targets[%*]. A non
  2341. existent nested variable will report itself as 0.
  2342. </span><span class='l37'>Example</span><span class='d37'>: #showme {Number of targets starting with A: &amp;targets[A%*]
  2343. In some scripts you need to know the name of a nested variable. This
  2344. is also known as the key, and you can get it using *variable. For
  2345. example *target[+1]. To get the first variable's name use *{+1}.
  2346. It's also possible to declare a table using brace notation. Using
  2347. #var hp[self] 34 is the equivalent of #var {hp} {{self}{34}}. This
  2348. also allows merging tables. #var hp[self] 34;#var hp[target] 46 is
  2349. the equivalent of #var {hp} {{self}{34} {target}{46}} as well as
  2350. #var {hp} {{self}{34}} {{target}{46}} or if you want to get creative
  2351. the equivalent of #var hp[self] 34;#var {hp} {&dollar;hp} {{target}{46}}.
  2352. </span><span class='l37'>Comment</span><span class='d37'>: You can remove a variable with the #unvariable command.
  2353. </span><span class='l37'>Related</span><span class='d37'>: cat, format, function, local, math, replace and script.
  2354. <a name='WHILE'></a>
  2355. </span><span class='l32'> WHILE
  2356. </span><span class='l37'>Command</span><span class='d37'>: #while </span><span class='l37'>{</span><span class='d37'>conditional</span><span class='l37'>} {</span><span class='d37'>commands</span><span class='l37'>}</span><span class='d37'>
  2357. This command works similar to a 'while' statement in other languages.
  2358. When a 'while' command is encourated, the conditional is evaluated,
  2359. and if TRUE (any non-zero result) the commands are executed. The
  2360. 'while' loop will be repeated indefinitely until the conditional is
  2361. FALSE or the #BREAK or #RETURN commands are found.
  2362. The 'while' statement is only evaluated if it is read, so you must
  2363. nest it inside a trigger, like an alias or action.
  2364. The conditional is evaluated exactly the same as in the 'math' command.
  2365. </span><span class='l37'>Example</span><span class='d37'>: #math cnt 0;#while {&dollar;cnt &lt; 20} {#math cnt &dollar;cnt + 1;say &dollar;cnt}
  2366. </span><span class='l37'>Comment</span><span class='d37'>: See '#help math', for more information.
  2367. </span><span class='l37'>Related</span><span class='d37'>: statements
  2368. <a name='WRITE'></a>
  2369. </span><span class='l32'> WRITE
  2370. </span><span class='l37'>Command</span><span class='d37'>: #write </span><span class='l37'>{</span><span class='d37'>&lt;filename&gt;</span><span class='l37'>} {</span><span class='d37'>[FORCE]</span><span class='l37'>}</span><span class='d37'>
  2371. Writes all current actions, aliases, subs, highlights, and variables
  2372. to a command file, specified by filename.
  2373. By default you cannot write to .map files to prevent accidentally
  2374. overwriting a map file. Use the FORCE argument to ignore this
  2375. protection.
  2376. </span><span class='l37'>Related</span><span class='d37'>: log, read, scan and textin.
  2377. <a name='ZAP'></a>
  2378. </span><span class='l32'> ZAP
  2379. </span><span class='l37'>Command</span><span class='d37'>: #zap {[session]}
  2380. Kill your current session. If there is no current session, it will
  2381. cause the program to terminate. If you provide an argument it'll zap
  2382. the given session instead.
  2383. </span><span class='l37'>Related</span><span class='d37'>: all, port, run, session, sessionname, snoop and ssl.