help.html 272 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv='content-type' content='text/html; charset=utf-8'>
  5. <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  6. <style type='text/css'>
  7. body {font-family:Consolas;font-size:12pt}
  8. a {text-decoration:none}
  9. a:link {color:#06b}
  10. a:visited {color:#6b0}
  11. a:hover {text-decoration:underline}
  12. a:active {color:#b06}
  13. </style>
  14. <body bgcolor='#000000'>
  15. </head>
  16. <pre>
  17. <span style='background-color:#000'><span style='color:#FFF'>
  18. <a href='#ACTION'> ACTION</a> <a href='#ALIAS'> ALIAS</a> <a href='#ALL'> ALL</a> <a href='#BELL'> BELL</a> <a href='#BREAK'> BREAK</a>
  19. <a href='#BUFFER'> BUFFER</a> <a href='#BUTTON'> BUTTON</a> <a href='#CASE'> CASE</a> <a href='#CAT'> CAT</a> <a href='#CHARACTERS'> CHARACTERS</a>
  20. <a href='#CHAT'> CHAT</a> <a href='#CLASS'> CLASS</a> <a href='#COLORS'> COLORS</a> <a href='#COMMANDS'> COMMANDS</a> <a href='#COORDINATES'> COORDINATES</a>
  21. <a href='#CONFIG'> CONFIG</a> <a href='#CONTINUE'> CONTINUE</a> <a href='#CR'> CR</a> <a href='#CURSOR'> CURSOR</a> <a href='#DAEMON'> DAEMON</a>
  22. <a href='#DEBUG'> DEBUG</a> <a href='#DEFAULT'> DEFAULT</a> <a href='#DELAY'> DELAY</a> <a href='#DRAW'> DRAW</a> <a href='#ECHO'> ECHO</a>
  23. <a href='#EDIT'> EDIT</a> <a href='#EDITING'> EDITING</a> <a href='#ELSE'> ELSE</a> <a href='#ELSEIF'> ELSEIF</a> <a href='#END'> END</a>
  24. <a href='#ESCAPE CODES'> ESCAPE CODES</a> <a href='#EVENT'> EVENT</a> <a href='#FOREACH'> FOREACH</a> <a href='#FORMAT'> FORMAT</a> <a href='#FUNCTION'> FUNCTION</a>
  25. <a href='#GAG'> GAG</a> <a href='#GREETING'> GREETING</a> <a href='#GREP'> GREP</a> <a href='#HELP'> HELP</a> <a href='#HIGHLIGHT'> HIGHLIGHT</a>
  26. <a href='#HISTORY'> HISTORY</a> <a href='#IF'> IF</a> <a href='#IGNORE'> IGNORE</a> <a href='#INDEX'> INDEX</a> <a href='#INFO'> INFO</a>
  27. <a href='#KEYPAD'> KEYPAD</a> <a href='#KILL'> KILL</a> <a href='#LINE'> LINE</a> <a href='#LIST'> LIST</a> <a href='#LISTS'> LISTS</a>
  28. <a href='#LOCAL'> LOCAL</a> <a href='#LOG'> LOG</a> <a href='#LOOP'> LOOP</a> <a href='#MACRO'> MACRO</a> <a href='#MAP'> MAP</a>
  29. <a href='#MAPPING'> MAPPING</a> <a href='#MATH'> MATH</a> <a href='#MATHEMATICS'> MATHEMATICS</a> <a href='#MESSAGE'> MESSAGE</a> <a href='#METRIC SYSTEM'> METRIC SYSTEM</a>
  30. <a href='#MOUSE'> MOUSE</a> <a href='#MSDP'> MSDP</a> <a href='#MSLP'> MSLP</a> <a href='#NOP'> NOP</a> <a href='#PARSE'> PARSE</a>
  31. <a href='#PATH'> PATH</a> <a href='#PATHDIR'> PATHDIR</a> <a href='#PCRE'> PCRE</a> <a href='#PORT'> PORT</a> <a href='#PROMPT'> PROMPT</a>
  32. <a href='#READ'> READ</a> <a href='#REGEXP'> REGEXP</a> <a href='#REPEAT'> REPEAT</a> <a href='#REPLACE'> REPLACE</a> <a href='#RETURN'> RETURN</a>
  33. <a href='#RUN'> RUN</a> <a href='#SCAN'> SCAN</a> <a href='#SCREEN'> SCREEN</a> <a href='#SCREEN READER'> SCREEN READER</a> <a href='#SCRIPT'> SCRIPT</a>
  34. <a href='#SEND'> SEND</a> <a href='#SESSION'> SESSION</a> <a href='#SESSIONNAME'> SESSIONNAME</a> <a href='#SHOWME'> SHOWME</a> <a href='#SNOOP'> SNOOP</a>
  35. <a href='#SPEEDWALK'> SPEEDWALK</a> <a href='#SPLIT'> SPLIT</a> <a href='#SSL'> SSL</a> <a href='#STATEMENTS'> STATEMENTS</a> <a href='#SUBSTITUTE'> SUBSTITUTE</a>
  36. <a href='#SUSPEND'> SUSPEND</a> <a href='#SWITCH'> SWITCH</a> <a href='#SYSTEM'> SYSTEM</a> <a href='#TAB'> TAB</a> <a href='#TEXTIN'> TEXTIN</a>
  37. <a href='#TICKER'> TICKER</a> <a href='#TIME'> TIME</a> <a href='#VARIABLE'> VARIABLE</a> <a href='#WHILE'> WHILE</a> <a href='#WRITE'> WRITE</a>
  38. <a href='#ZAP'> ZAP</a>
  39. <a name='ACTION'></a>
  40. </span><span style='color:#5F5'> ACTION
  41. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>message</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>priority</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  42. The #action command can be used to respond with one or several
  43. commands to a specific message send by the server. The %1-%99
  44. variables are substituted from the message and can be used in the
  45. command part of the action.
  46. The priority part is optional and determines the priority of the
  47. action, it defaults to 5.
  48. If the message starts with a ~ color codes must be matched. You can
  49. enable #config {convert meta} on to display meta characters.
  50. For more information on pattern matching see the section on PCRE.
  51. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action {%1 tells you '%2'} {tell %1 I'm afk.}
  52. Actions can be triggered by the show command and certain system
  53. messages.
  54. Actions can be triggered by the #show command. If you don't want a
  55. #show to get triggered use: #line ignore #show {text}
  56. Actions are ordered alphabetically and only one action can trigger at
  57. a time. To change the order you can assign a priority, which defaults
  58. to 5, with a lower number indicating a higher priority. The priority
  59. can be a floating point number.
  60. To remove action with %* as the message, use #unaction {%%*} or
  61. #unaction {%*}. Alternatively you could wrap the action inside a
  62. class, and kill that class when you no longer need the action.
  63. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove an action with the #unaction command.
  64. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#PCRE'>pcre</a>, <a href='#GAG'>gag</a>, <a href='#HIGHLIGHT'>highlight</a>, <a href='#PROMPT'>prompt</a> and <a href='#SUBSTITUTE'>substitute</a>.
  65. <a name='ALIAS'></a>
  66. </span><span style='color:#5F5'> ALIAS
  67. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #alias </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>priority</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  68. The #alias command can be used to shorten up long or oftenly used
  69. commands. The %1-99 variables are substituted from the arguments when
  70. using an alias and represent the 1st till 99th word which can be used
  71. in the commands part of the alias. If %0 is used it will contain all
  72. arguments. The priority part is optional and determines the priority
  73. of the alias, it defaults to 5.
  74. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias {k} {kill %1;kick}
  75. Typing 'k orc' would result in attacking the orc followed by a kick.
  76. You can create multi-word aliases by using variables in the name
  77. section.
  78. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias {k %1 with %2} {draw %2;attack %1;slash %1 with %2;
  79. kick at %2;strike %1 with %2}
  80. Using the above alias you could type k blue smurf with battle axe
  81. To have an alias that matches all user input, use %* as the name.
  82. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias {%*} {#show You wrote: %0}
  83. Aliases are ordered alphabetically and only one alias can trigger at
  84. a time. To change the order you can assign a priority, which defaults
  85. to 5, with a lower number indicating a higher priority. The priority
  86. can be a floating point number.
  87. To remove an alias with %* as the name, use #unalias {%%*} or #unalias
  88. {%*}. Alternatively you can wrap the alias inside a class, and kill
  89. that class when you no longer need the alias.
  90. For more information on pattern matching see the section on PCRE.
  91. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove an alias with the #unalias command.
  92. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CURSOR'>cursor</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a>, <a href='#SPEEDWALK'>speedwalk</a> and <a href='#TAB'>tab</a>.
  93. <a name='ALL'></a>
  94. </span><span style='color:#5F5'> ALL
  95. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #all </span><span style='color:#FFF'>{</span><span style='color:#AAA'>string</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  96. If you have multiple sessions in one terminal you can use #all to
  97. execute the command with all sessions, excluding the startup session.
  98. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #all quit
  99. Sends 'quit' to all sessions.
  100. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#PORT'>port</a>, <a href='#RUN'>run</a>, <a href='#SESSION'>session</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SNOOP'>snoop</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  101. <a name='BELL'></a>
  102. </span><span style='color:#5F5'> BELL
  103. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #bell </span><span style='color:#FFF'>{</span><span style='color:#AAA'>flash</span><span style='color:#FFF'>|</span><span style='color:#AAA'>focus</span><span style='color:#FFF'>|</span><span style='color:#AAA'>margin</span><span style='color:#FFF'>|</span><span style='color:#AAA'>ring</span><span style='color:#FFF'>|</span><span style='color:#AAA'>volume</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  104. The #bell command without an argument will ring the terminal bell.
  105. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action {Bubba tells you} {#bell}
  106. If you aren't watching the screen this could be useful if you don't
  107. want to miss out on a conversation with Bubba. Alternatively you can
  108. use #system to play a sound file.
  109. Some terminals will allow you to use VT100 Operating System Commands
  110. to change the terminal's bell behavior which can be used to flash the
  111. taskbar icon and or focus the window on receival of a bell.
  112. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action {Bubba tells you} {#screen save title;#screen set title Tell!;
  113. #bell ring;#delay 10 #screen load title}
  114. The above example will save your window title, change the title to
  115. 'Tell!', ring the bell, next reset the window title after 10 seconds.
  116. It's possible to set the terminal to pop to the foreground upon
  117. ringing of the alarm bell.
  118. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #bell focus on;#bell ring;#bell focus off
  119. It's possible to adjust the alarm bell volume on some terminals.
  120. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #loop {1} {8} {cnt} {#line substitute variables
  121. #delay {&dollar;cnt} {#show Volume &dollar;cnt: #bell volume &dollar;cnt;#bell}
  122. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SCREEN'>screen</a>
  123. <a name='BREAK'></a>
  124. </span><span style='color:#5F5'> BREAK
  125. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #break
  126. The break command can be used inside the #else, #elseif, #if, #foreach,
  127. #loop, #parse, #switch, and #while statements. When #break is found,
  128. tintin will stop executing the statement it is currently in and move on
  129. to the next.
  130. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #while {1} {#math cnt &dollar;cnt + 1;#if {&dollar;cnt == 20} {#break}}
  131. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#STATEMENTS'>statements</a>
  132. <a name='BUFFER'></a>
  133. </span><span style='color:#5F5'> BUFFER
  134. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #buffer </span><span style='color:#FFF'>{</span><span style='color:#AAA'>home</span><span style='color:#FFF'>|</span><span style='color:#AAA'>up</span><span style='color:#FFF'>|</span><span style='color:#AAA'>down</span><span style='color:#FFF'>|</span><span style='color:#AAA'>end</span><span style='color:#FFF'>|</span><span style='color:#AAA'>lock</span><span style='color:#FFF'>|</span><span style='color:#AAA'>find</span><span style='color:#FFF'>|</span><span style='color:#AAA'>get</span><span style='color:#FFF'>|</span><span style='color:#AAA'>clear</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  135. The buffer command has various options to manipulate your scrollback
  136. buffer.
  137. </span><span style='color:#FFF'>#buffer {home}
  138. </span><span style='color:#AAA'>
  139. Moves you to the top of your scrollback buffer and displays the page.
  140. Enables scroll lock mode. Most useful when used in a #macro.
  141. </span><span style='color:#FFF'>#buffer {up} [lines]
  142. </span><span style='color:#AAA'>
  143. Moves your scrollback buffer up one page and displays the page.
  144. Enables scroll lock mode. Most useful when used in a #macro. You
  145. can use #buffer {up} {1} to move the scrollback buffer up 1 line.
  146. </span><span style='color:#FFF'>#buffer {down} [lines]
  147. </span><span style='color:#AAA'>
  148. Moves your scrollback buffer down one page and displays the page.
  149. Enables scroll lock mode unless at the end. Most useful when used in
  150. a #macro.
  151. </span><span style='color:#FFF'>#buffer {end}
  152. </span><span style='color:#AAA'>
  153. Moves you to the end of your scrollback buffer and displays the page.
  154. Disables scroll lock mode. Most useful when used in a #macro.
  155. </span><span style='color:#FFF'>#buffer {find} {[number]} {&lt;string&gt;}
  156. </span><span style='color:#AAA'>
  157. Moves the buffer to the given string which can contain a regular
  158. expression. Optionally you can provide the number of matches to skip,
  159. allowing you to jump further back in the buffer.
  160. </span><span style='color:#FFF'>#buffer {get} {&lt;variable&gt;} {&lt;lower bound&gt;} {[upper bound]}
  161. </span><span style='color:#AAA'>
  162. Allows you to store one or several lines from your scrollback buffer
  163. (including color codes) into a variable. The lower and upper bound
  164. must be between 1 and the size of the buffer. If the upper bound is
  165. omitted the given line is stored as a standard variable. If an upper
  166. bound is given the lines between the two bounds are stored as a list.
  167. </span><span style='color:#FFF'>#buffer {info} {[save]} {[variable]}
  168. </span><span style='color:#AAA'>
  169. Display buffer info, optionally save the data to a variable.
  170. </span><span style='color:#FFF'>#buffer {lock} {on|off}
  171. </span><span style='color:#AAA'>
  172. Toggles the lock on the scrollback buffer. When locked, newly incoming
  173. text won't be displayed, any command will disable the lock, though
  174. several buffer commands will re-enable the lock. When unlocking it'll
  175. move you to the end of your scrollback buffer and display the page.
  176. </span><span style='color:#FFF'>#buffer {write} {&lt;filename&gt;}
  177. </span><span style='color:#AAA'>
  178. Writes the scrollback buffer to the given file.
  179. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #macro {&bsol;e[F} {#buffer end}
  180. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#GREP'>grep</a>, <a href='#MACRO'>macro</a>, <a href='#SHOWME'>showme</a> and <a href='#SCREEN'>screen</a>.
  181. <a name='BUTTON'></a>
  182. </span><span style='color:#5F5'> BUTTON
  183. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #button </span><span style='color:#FFF'>{</span><span style='color:#AAA'>square</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>priority</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  184. The #button command can be used to respond with one or several
  185. commands to a mouse click received within the specified square.
  186. The click coordinates are stored in %0-%3 and can be used in the
  187. command part of the button.
  188. The square part should exists of two coordinates defining the
  189. upper left and bottom right corner using row, col, row, col syntax.
  190. The square arguments should be separated by spaces, semi-colons or
  191. braces.
  192. By default the button is set to respond to a mouse button press, to
  193. respond to other button presses you must add a 5th argument to the
  194. square that defines the button press type. You can enable #info
  195. button on to see button events and their type as they happen.
  196. The priority part is optional and determines the priority of the
  197. button, it defaults to 5.
  198. You must enable #config {mouse tracking} on for buttons to work.
  199. This command draws no visible button, you'll have to do so separately
  200. if needed.
  201. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #button {1;1;2;2} {#show You clicked the upper left corner.}
  202. Buttons are ordered alphabetically and only one button can trigger at
  203. a time. To change the order you can assign a priority, which defaults
  204. to 5, with a lower number indicating a higher priority. The priority
  205. can be a floating point number.
  206. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: To see button clicks trigger use #info button on.
  207. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a button with the #unbutton command.
  208. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#DELAY'>delay</a>, <a href='#EVENT'>event</a> and <a href='#TICKER'>ticker</a>.
  209. <a name='CASE'></a>
  210. </span><span style='color:#5F5'> CASE
  211. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #case </span><span style='color:#FFF'>{</span><span style='color:#AAA'>conditional</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>arguments</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  212. The case command must be used within the #switch command. When the
  213. conditional argument of the case command matches the conditional
  214. argument of the switch command the body of the case is executed.
  215. When comparing strings both the switch and case arguments must be
  216. surrounded in quotes.
  217. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>:
  218. #function {reverse_direction}
  219. {
  220. #switch {&quot;%1&quot;}
  221. {
  222. #case {&quot;north&quot;} {#return south};
  223. #case {&quot;east&quot;} {#return west};
  224. #case {&quot;south&quot;} {#return north};
  225. #case {&quot;west&quot;} {#return east};
  226. #case {&quot;up&quot;} {#return down};
  227. #case {&quot;down&quot;} {#return up}
  228. }
  229. }
  230. This function returns the reverse direction. @reverse_direction{north}
  231. would return south.
  232. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#DEFAULT'>default</a>, <a href='#STATEMENTS'>statements</a> and <a href='#SWITCH'>switch</a>.
  233. <a name='CAT'></a>
  234. </span><span style='color:#5F5'> CAT
  235. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #cat </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  236. The cat command will concatinate the argument to the given variable.
  237. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#FORMAT'>format</a>, <a href='#FUNCTION'>function</a>, <a href='#LOCAL'>local</a>, <a href='#MATH'>math</a>, <a href='#REPLACE'>replace</a>, <a href='#SCRIPT'>script</a> and <a href='#VARIABLE'>variable</a>.
  238. <a name='CHARACTERS'></a>
  239. </span><span style='color:#5F5'> CHARACTERS
  240. </span><span style='color:#AAA'>
  241. The following special characters are defined:
  242. # The hashtag is the default character for starting a command and is
  243. subsequently known as the command character or tintin character.
  244. When loading a command file the command character is set to the
  245. first character in the file. The character can also be redefined
  246. using #config.
  247. ; The semi-colon is used as the command separator and can be used to
  248. separate two commands. Multiple commands can be strung together as
  249. well. Trailing semi-colons are ignored when reading a script file
  250. as this is a common error.
  251. { } Curly brackets aka braces are used for separating multi word command
  252. arguments, nesting commands, and nesting variables. Braces cannot
  253. easily be escaped and must always be used in pairs.
  254. &quot; &quot; Quote characters are used for strings in the #math, #if, #switch,
  255. and #case commands. It is however suggested to use a set of braces
  256. { } to define strings instead, particularly when checking strings
  257. that may contain quotes.
  258. ! The exclamation sign is used to repeat commands, see #help history.
  259. The character can be redefined using #config.
  260. &bsol; An input line starting with a backslash is send verbatim if you are
  261. connected to a server. This character can be configured with
  262. #config, and is itself send verbatim when the verbatim config mode
  263. is enabled.
  264. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COLORS'>colors</a>, <a href='#ESCAPE'>escape</a>, <a href='#FUNCTION'>function</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#PCRE'>pcre</a> and <a href='#VARIABLE'>variable</a>.
  265. <a name='CHAT'></a>
  266. </span><span style='color:#5F5'> CHAT
  267. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #chat </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}
  268. </span><span style='color:#AAA'>
  269. The #chat command is used to create peer to peer connections to other
  270. clients, typically for the purpose of chatting and sending files.
  271. This is a decentralized chat system, meaning you have to exchange ip
  272. addresses and port numbers with other users in order to connect to
  273. them.
  274. </span><span style='color:#FFF'>#chat {init} {port}
  275. </span><span style='color:#AAA'> #chat initialize launches your chat server. The port number is
  276. optional, and by default 4050 is used as your port. After using
  277. this command other people can connect to your chat server using
  278. your ip address and port number, and in turn you can connect to
  279. other people.
  280. </span><span style='color:#FFF'>#chat {name} {name}
  281. </span><span style='color:#AAA'> By default your name is set to TinTin, but most servers will
  282. reject you if there is already someone with the name TinTin
  283. connected, so one of the first things you'd want to do is
  284. change your chat name. Your name can include color codes. Some
  285. names aren't accepted by tt++ chat servers, like the name 'all'
  286. and names longer than 20 characters.
  287. </span><span style='color:#FFF'>#chat {message} {buddy|all} {text}
  288. </span><span style='color:#AAA'> This is the main command used for communication. If you use
  289. #chat message all, the message is marked as public and send to
  290. everyone you are connected to.
  291. </span><span style='color:#FFF'>#chat {accept} {buddy} {boost}
  292. </span><span style='color:#AAA'> Accept a file transfer from a buddy. The boost is optional and
  293. must be a value between 1 and 1000.
  294. </span><span style='color:#FFF'>#chat {call} {address} {port}
  295. </span><span style='color:#AAA'> #chat call is used to connect to another chat server. If you
  296. omit the port argument the default port (4050) is used.
  297. </span><span style='color:#FFF'>#chat {cancel} {buddy} Cancel a file transfer
  298. #chat {color} {color names} Set the default color
  299. #chat {decline} {buddy} Decline a file transfer
  300. #chat {dnd} Decline new connections
  301. #chat {download} {directory} Set your download directory
  302. #chat {emote} {buddy|all} {text} Send an emote message
  303. #chat {forward} {buddy} Forward all chat messages
  304. #chat {forwardall} {buddy} Forward all session output
  305. #chat {filestat} {buddy} Show file transfer data
  306. #chat {group} {buddy} {name} Assign a chat group
  307. #chat {ignore} {buddy} Ignores someone
  308. #chat {info} Displays your info
  309. #chat {ip} {address} Changes your IP address
  310. #chat {paste} {buddy|all} {text} Pastes a block of text
  311. #chat {peek} {buddy} Show one's public connections
  312. #chat {ping} {buddy} Display response time
  313. #chat {private} {buddy|all} Make a connection private
  314. #chat {public} {buddy|all} Make a connection public
  315. #chat {reply} {text} Reply to last private message
  316. #chat {request} {buddy} Request one's public connections
  317. #chat {send} {buddy|all} {text} Sends a raw data string
  318. #chat {sendfile} {buddy} {filename} Start a file transfer
  319. #chat {serve} {buddy} Forward all public chat messages
  320. #chat {uninitialize} Uninitialize the chat port.
  321. #chat {who} Show all connections
  322. </span><span style='color:#AAA'> #chat who shows all people you are connected to. The first
  323. column shows a reference number for the connection, which can be
  324. used instead of the connection's name when sending someone a message
  325. The second column shows the connection's name. The third column
  326. shows flags set for the connection, (P)rivate, (I)gnore, (S)erve,
  327. (F)orward to user, and (f)orward from user. The next columns show
  328. ip, port, and client name.
  329. </span><span style='color:#FFF'>#chat {zap} {buddy} Close a connection
  330. Related</span><span style='color:#AAA'>: <a href='#PORT'>port</a>
  331. <a name='CLASS'></a>
  332. </span><span style='color:#5F5'> CLASS
  333. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #class </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>optionkill</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>arg</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  334. </span><span style='color:#FFF'>#class {&lt;name&gt;} {assign} {&lt;argument&gt;}
  335. </span><span style='color:#AAA'> Will execute argument with the given class opened.
  336. </span><span style='color:#FFF'>#class {&lt;name&gt;} {clear}
  337. </span><span style='color:#AAA'> Will delete all triggers associated with the given class.
  338. </span><span style='color:#FFF'>#class {&lt;name&gt;} {close}
  339. </span><span style='color:#AAA'> Close the given class, opening the last open class, if any.
  340. </span><span style='color:#FFF'>#class {&lt;name&gt;} {kill}
  341. </span><span style='color:#AAA'> Will clear, close, and remove the class.
  342. </span><span style='color:#FFF'>#class {&lt;name&gt;} {list}
  343. </span><span style='color:#AAA'> List all triggers associated with the given class.
  344. </span><span style='color:#FFF'>#class {&lt;name&gt;} {load}
  345. </span><span style='color:#AAA'> Will load the saved copy of the class from memory.
  346. </span><span style='color:#FFF'>#class {&lt;name&gt;} {open}
  347. </span><span style='color:#AAA'> Open a class, closing a previously opened class. All triggers
  348. added afterwards are assigned to this class.
  349. </span><span style='color:#FFF'>#class {&lt;name&gt;} {read} {&lt;filename&gt;
  350. </span><span style='color:#AAA'> Will open the class, read the file, and close afterwards.
  351. </span><span style='color:#FFF'>#class {&lt;name&gt;} {save}
  352. </span><span style='color:#AAA'> Will save all triggers of the given class to memory.
  353. </span><span style='color:#FFF'>#class {&lt;name&gt;} {size} {&lt;variable&gt;}
  354. </span><span style='color:#AAA'> Will store the size of the class in a variable.
  355. </span><span style='color:#FFF'>#class {&lt;name&gt;} {write} {&lt;filename&gt;}
  356. </span><span style='color:#AAA'> Will write all triggers of the given class to file.
  357. The {kill} option will delete all triggers of the given class.
  358. Keep in mind that the kill and read option are very fast allowing
  359. them to be used to enable and disable classes.
  360. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #class extra kill;#class extra read extra.tin
  361. Deletes all triggers of 'extra' class if any. Read 'extra.tin' file,
  362. all triggers loaded will be assigned to the fresh new 'extra' class.
  363. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CONFIG'>config</a>, <a href='#DEBUG'>debug</a>, <a href='#IGNORE'>ignore</a>, <a href='#INFO'>info</a>, <a href='#KILL'>kill</a>, <a href='#LINE'>line</a> and <a href='#MESSAGE'>message</a>.
  364. <a name='COLORS'></a>
  365. </span><span style='color:#5F5'> COLORS
  366. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: &lt;xyz&gt; with x, y, z being parameters
  367. Parameter 'x': VT100 code
  368. 0 - Reset all colors and codes to default
  369. 1 - Bold
  370. 2 - Dim
  371. 3 - Italic
  372. 4 - Underscore
  373. 5 - Blink
  374. 7 - Reverse
  375. 8 - Skip (use previous code)
  376. Parameter 'y': Foreground color
  377. Parameter 'z': Background color
  378. 0 - Black 5 - Magenta
  379. 1 - Red 6 - Cyan
  380. 2 - Green 7 - White
  381. 3 - Yellow 8 - Skip
  382. 4 - Blue 9 - Default
  383. For xterm 256 colors support use &lt;aaa&gt; to &lt;fff&gt; for RGB foreground
  384. colors and &lt;AAA&gt; to &lt;FFF&gt; for RGB background colors. For the grayscale
  385. foreground colors use &lt;g00&gt; to &lt;g23&gt;, for grayscale background colors
  386. use &lt;G00&gt; to &lt;G23&gt;.
  387. The tertiary colors are as follows:
  388. &lt;acf&gt; - Azure &lt;afc&gt; - Jade
  389. &lt;caf&gt; - Violet &lt;cfa&gt; - Lime
  390. &lt;fac&gt; - Pink &lt;fca&gt; - Orange
  391. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show &lt;acf&gt;Azure &lt;afc&gt;Jade &lt;caf&gt;Violet
  392. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show &lt;cfa&gt;Lime &lt;fac&gt;Pink &lt;fca&gt;Orange
  393. For 12 bit truecolor use &lt;F000&gt; to &lt;FFFF&gt; for foreground colors and
  394. &lt;B000&gt; to &lt;BFFF&gt; for background colors.
  395. For 24 bit truecolor use &lt;F000000&gt; to &lt;FFFFFFF&gt; for foreground
  396. colors and &lt;B000000&gt; to &lt;BFFFFFF&gt; for background colors.
  397. If the color code exceeds your configured color mode it will be
  398. downgraded to the closest match.
  399. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  400. <a name='COMMANDS'></a>
  401. </span><span style='color:#5F5'> COMMANDS
  402. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #commands </span><span style='color:#FFF'>{</span><span style='color:#AAA'>regex</span><span style='color:#FFF'>}
  403. </span><span style='color:#AAA'>
  404. Shows all commands or all commands matching the given search
  405. string.
  406. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#HELP'>help</a>, <a href='#INFO'>info</a> and <a href='#STATEMENTS'>statements</a>.
  407. <a name='COORDINATES'></a>
  408. </span><span style='color:#5F5'> COORDINATES
  409. </span><span style='color:#AAA'>
  410. When the 0,0 coordinate is in the upper left corner TinTin++ uses
  411. a y,x / rows,cols notation. When the 0,0 coordinate is in the
  412. bottom left corner tintin uses a x,y / cols/rows notation.
  413. When a square is defined this is done by specifying the upper left
  414. and bottom right corner of the square using four coordinates.
  415. The vast majority of tintin commands use row,col notation.
  416. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  417. <a name='CONFIG'></a>
  418. </span><span style='color:#5F5'> CONFIG
  419. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #config </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  420. This allows you to configure various settings, the settings can be
  421. written to file with the #write command.
  422. If you configure the global session (the one you see as you start up
  423. tintin) all sessions started will inherite these settings.
  424. It's advised to make a configuration file to read on startup if you
  425. do not like the default settings.
  426. Use #config without an argument to see your current configuration as
  427. well as a brief explanation of each config option.
  428. The following config options are not listed by default:
  429. #CONFIG {CHILD LOCK} {ON|OFF} Enable or disable command input.
  430. #CONFIG {CONVERT META} {ON|OFF} Shows color codes and key bindings.
  431. #CONFIG {DEBUG TELNET} {ON|OFF} Shows telnet negotiations y/n.
  432. #CONFIG {LOG LEVEL} {LOW|HIGH} LOW logs server output before triggers.
  433. #CONFIG {INHERITANCE} {ON|OFF} Session trigger inheritance y/n.
  434. #CONFIG {MCCP} {ON|OFF} Enable or disable MCCP support.
  435. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a> and <a href='#LINE'>line</a>.
  436. <a name='CONTINUE'></a>
  437. </span><span style='color:#5F5'> CONTINUE
  438. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #continue
  439. The continue command can be used inside the #FOREACH, #LOOP, #PARSE,
  440. #WHILE and #SWITCH commands. When #CONTINUE is found, tintin will go
  441. to the end of the command and proceed as normal, which may be to
  442. reiterate the command.
  443. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #loop 1 10 cnt {#if {&dollar;cnt % 2 == 0} {#continue} {say &dollar;cnt}}
  444. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  445. <a name='CR'></a>
  446. </span><span style='color:#5F5'> CR
  447. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #cr
  448. Sends a carriage return to the session. Useful for aliases that need
  449. extra carriage returns.
  450. This command is obsolete as you can accomplish the same using #send
  451. without an argument or #send {}.
  452. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#FORALL'>forall</a>
  453. <a name='CURSOR'></a>
  454. </span><span style='color:#5F5'> CURSOR
  455. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #cursor </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  456. Typing #cursor without an option will show all available cursor
  457. options, their default binding, and an explanation of their function.
  458. The cursor command's primarly goal is adding customizable input editing
  459. with macros. Subsequently many cursor commands only work properly when
  460. used within a macro or event.
  461. </span><span style='color:#FFF'>#cursor flag
  462. </span><span style='color:#AAA'>EOL end of line character(s)
  463. ECHO local echo
  464. OVERTYPE overtype mode
  465. </span><span style='color:#FFF'>#cursor macro
  466. </span><span style='color:#AAA'>PRESERVE do not erase the macro from the macro input buffer
  467. RESET erase the macro input buffer
  468. </span><span style='color:#FFF'>#cursor tab
  469. </span><span style='color:#AAA'>CASELESS makes tab completion caseless
  470. COMPLETE makes tab completion work while editing
  471. DICTIONARY performs tab completion on the dictionary
  472. LIST performs tab completion on the tab completion list
  473. SCROLLBACK performs tab completion on the scrollback buffer
  474. BACKWARD specifies tab completion to go backward
  475. FORWARD specifies tab completion to go forward
  476. Multiple options can/must be specified at once.
  477. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a>, <a href='#SPEEDWALK'>speedwalk</a> and <a href='#TAB'>tab</a>.
  478. <a name='DAEMON'></a>
  479. </span><span style='color:#5F5'> DAEMON
  480. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #daemon </span><span style='color:#FFF'>{</span><span style='color:#AAA'>attach</span><span style='color:#FFF'>|</span><span style='color:#AAA'>detach</span><span style='color:#FFF'>|</span><span style='color:#AAA'>kill</span><span style='color:#FFF'>|</span><span style='color:#AAA'>list</span><span style='color:#FFF'>} [</span><span style='color:#AAA'>name</span><span style='color:#FFF'>]
  481. </span><span style='color:#AAA'>#daemon provides functionality similar to that of the screen and tmux
  482. utilities.
  483. </span><span style='color:#FFF'>#daemon attach [name]
  484. </span><span style='color:#AAA'> The attach option will try to find a daemonized tintin instance and
  485. take over control. The name argument is optional.
  486. </span><span style='color:#FFF'>#daemon detach [name]
  487. </span><span style='color:#AAA'> The detach option will daemonize tintin, turning it into a background
  488. process. The name argument is optional and is useful if you have
  489. several daemonized tt++ instances running so you can keep them apart.
  490. </span><span style='color:#FFF'>#daemon kill [name]
  491. </span><span style='color:#AAA'> Kills all daemons or daemons with matching name.
  492. </span><span style='color:#FFF'>#daemon list [name]
  493. </span><span style='color:#AAA'> List all daemons or daemons with matching name.
  494. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SCRIPT'>script</a>, <a href='#SYSTEM'>system</a> and <a href='#RUN'>run</a>.
  495. <a name='DEBUG'></a>
  496. </span><span style='color:#5F5'> DEBUG
  497. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #debug </span><span style='color:#FFF'>{</span><span style='color:#AAA'>listname</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>on</span><span style='color:#FFF'>|</span><span style='color:#AAA'>off</span><span style='color:#FFF'>|</span><span style='color:#AAA'>log</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  498. Toggles a list on or off. With no argument it shows your current
  499. settings, as well as the list names that you can debug.
  500. If you for example set ACTIONS to ON you will get debug information
  501. whenever an action is triggered.
  502. #debug {listname} {log} will silently write debugging information to
  503. the log file, you must be logging in order for this to work.
  504. Not every list has debug support yet.
  505. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a>, <a href='#IGNORE'>ignore</a>, <a href='#INFO'>info</a>, <a href='#KILL'>kill</a> and <a href='#MESSAGE'>message</a>.
  506. <a name='DEFAULT'></a>
  507. </span><span style='color:#5F5'> DEFAULT
  508. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #default </span><span style='color:#FFF'>{</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  509. The default command can only be used within the switch command. When
  510. the conditional argument of non of the case commands matches the switch
  511. command's conditional statement the default command is executed.
  512. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CASE'>case</a>, <a href='#DEFAULT'>default</a>, <a href='#ELSE'>else</a>, <a href='#ELSEIF'>elseif</a>, <a href='#IF'>if</a>, <a href='#SWITCH'>switch</a> and <a href='#REGEXP'>regexp</a>.
  513. <a name='DELAY'></a>
  514. </span><span style='color:#5F5'> DELAY
  515. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #delay </span><span style='color:#FFF'>{</span><span style='color:#AAA'>seconds</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>command</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  516. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #delay </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>command</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>seconds</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  517. Delay allows you to have tintin wait the given amount of seconds
  518. before executing the given command.
  519. Nanosecond floating point precision is allowed. Delays will fire in
  520. 0.01 second intervals.
  521. Named delays are treated as one-shot tickers, see #help tick.
  522. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #delay {1} {#show last};#show first
  523. This will print 'first', and 'last' around one second later.
  524. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: If you want to remove a delay with the #undelay command you can add
  525. a name as the first argument, be aware this changes the syntax. If
  526. the name is a number keep in mind that delays with the same numeric
  527. name will not be overwritten
  528. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#TICKER'>ticker</a>.
  529. <a name='DRAW'></a>
  530. </span><span style='color:#5F5'> DRAW
  531. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #draw </span><span style='color:#FFF'>[</span><span style='color:#AAA'>line color</span><span style='color:#FFF'>] [</span><span style='color:#AAA'>options</span><span style='color:#FFF'>] &lt;</span><span style='color:#AAA'>type</span><span style='color:#FFF'>&gt; &lt;</span><span style='color:#AAA'>square</span><span style='color:#FFF'>&gt; {</span><span style='color:#AAA'>text</span><span style='color:#FFF'>}
  532. </span><span style='color:#AAA'>
  533. The draw commands allows you to draw various types of lines and shapes
  534. on the screen. The types with a brief description are provided when you
  535. type #draw without an argument.
  536. The &lt;square&gt; arguments should exists of two coordinates defining the
  537. upper left and bottom right corner using row, col, row, col syntax.
  538. The square arguments can be negative, in which case the coordinates
  539. are calculated from the opposite side of the screen. In the case the
  540. screen is 80 columns wide using #draw box 1 60 10 70 will be the
  541. equivalent of #draw box 1 -21 10 -11, but with different screen
  542. widths the boxes would be drawn in different places.
  543. You can prefix the option with a color code or color name to color the
  544. lines and shapes.
  545. You can further prefix the option as following:
  546. ASCII will draw in ASCII mode.
  547. BALIGN will bottom align text.
  548. BLANKED will blank the lines and corners.
  549. BOTTOM will draw on the bottom side if possible.
  550. BOXED will draw a box along the square.
  551. BUMPED will precede the draw with an enter.
  552. CALIGN will center text.
  553. CIRCLED will circle the corners.
  554. CONVERT will draw text with meta conversion.
  555. CROSSED will cross the corners.
  556. CURSIVE will draw text with cursive letters.
  557. FAT will draw text with fat letters.
  558. FILLED will fill circles and jewels.
  559. FOREGROUND will draw even if session is not active.
  560. GRID will draw TABLE as a grid.
  561. HORIZONTAL will draw horizontal if possible.
  562. HUGE will draw text in huge letters.
  563. JEWELED will diamond the corners.
  564. JOINTED will draw corners.
  565. LALIGN will left align text.
  566. LEFT will draw on the left side if possible.
  567. NUMBERED will draw numbers instead of lines.
  568. PRUNED will prune the corners.
  569. RALIGN will right align text.
  570. RIGHT will draw on the right side if possible.
  571. ROUNDED will round the corners.
  572. SANSSERIF will draw text with sansserif letters.
  573. SCALED will fit the square to the text size.
  574. SCROLL will draw in the scrolling region.
  575. SHADOWED will shadow HUGE text.
  576. TALIGN will top align text too large to fit.
  577. TEED will tee the corners.
  578. TOP will draw on the top side if possible.
  579. TRACED will trace HUGE text.
  580. TUBED will draw tubes instead of lines.
  581. UALIGN will unwrap and rewrap text.
  582. UNICODE will draw in unicode mode.
  583. VERTICAL will draw vertical if possible.
  584. The following types are available.
  585. [HORIZONTAL] </span><span style='color:#FFF'>BAR</span><span style='color:#AAA'> {&lt;MIN&gt;;&lt;MAX&gt;;[COLOR]}
  586. will draw a bar, use two 256 color codes for a color gradient.
  587. [ASCII|UNICODE|HUGE] </span><span style='color:#FFF'>BOX</span><span style='color:#AAA'> {[TEXT1]} {[TEXT2]}
  588. will draw a box.
  589. [BOXED|FOREGROUND] </span><span style='color:#FFF'>BUFFER
  590. </span><span style='color:#AAA'> will draw the scrollback buffer.
  591. [BLANKED|CIRCLED|CROSSED|JEWELED|ROUNDED|TEED|PRUNED] </span><span style='color:#FFF'>CORNER
  592. </span><span style='color:#AAA'> will draw a corner.
  593. [BLANKED|HORIZONTAL|NUMBERED|TUBED|VERTICAL] </span><span style='color:#FFF'>LINE</span><span style='color:#AAA'> {[TEXT]}
  594. will draw a line.
  595. [BOXED] </span><span style='color:#FFF'>MAP
  596. </span><span style='color:#AAA'> will draw the map
  597. </span><span style='color:#FFF'>RAIN</span><span style='color:#AAA'> {&lt;VARIABLE&gt;} {[SPAWN]} {[FADE]} {[LEGEND]}
  598. will draw digital rain.
  599. [JOINTED|TOP|LEFT|BOTTOM|RIGHT] </span><span style='color:#FFF'>SIDE
  600. </span><span style='color:#AAA'> will draw one or more sides of a box.
  601. [GRID] </span><span style='color:#FFF'>TABLE</span><span style='color:#AAA'> {[LIST1]} {[LIST2]}
  602. will draw a table.
  603. [CURSIVE|FAT|HUGE|SANSSERIF] </span><span style='color:#FFF'>TILE</span><span style='color:#AAA'> {[TEXT1]} {[TEXT2]}
  604. will draw a tile
  605. All draw types take an optional text argument as long as a valid
  606. square with enough space has been defined. Text is automatically
  607. word wrapped and text formatting can be customized with the
  608. CALIGN, LALIGN, RALIGN, and UALIGN options.
  609. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #draw Blue box 1 1 3 20 {Hello world!}
  610. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUFFER'>buffer</a>, <a href='#ECHO'>echo</a>, <a href='#GREP'>grep</a> and <a href='#SHOWME'>showme</a>.
  611. <a name='ECHO'></a>
  612. </span><span style='color:#5F5'> ECHO
  613. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #echo </span><span style='color:#FFF'>{</span><span style='color:#AAA'>format</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument1</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument2</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>etc</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  614. Echo command displays text on the screen with formatting options. See
  615. the help file for the format command for more information.
  616. The echo command does not trigger actions.
  617. As with the #show command you can split the {format} argument up into
  618. two braced arguments, in which case the 2nd argument is the row number.
  619. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #echo {The current date is %t.} {%Y-%m-%d %H:%M:%S}
  620. #echo {[%38s][%-38s]} {Hello World} {Hello World}
  621. #echo {{this is %s on the top row} {1}} {printed}
  622. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUFFER'>buffer</a>, <a href='#FORMAT'>format</a>, <a href='#GREP'>grep</a> and <a href='#SHOWME'>showme</a>.
  623. <a name='EDIT'></a>
  624. </span><span style='color:#5F5'> EDIT
  625. #edit </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} [</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>]</span><span style='color:#AAA'>
  626. The edit command can be used to turn the default line editor into a
  627. text editor.
  628. </span><span style='color:#FFF'>#edit create &lt;arguments&gt;</span><span style='color:#AAA'>
  629. Create an editor, initialize using the provided arguments.
  630. </span><span style='color:#FFF'>#edit load &lt;variable&gt;</span><span style='color:#AAA'>
  631. Create an editor, initialize using the provided list variable.
  632. </span><span style='color:#FFF'>#edit read &lt;filename&gt;</span><span style='color:#AAA'>
  633. Create an editor, initialize using the provided file.
  634. </span><span style='color:#FFF'>#edit resume</span><span style='color:#AAA'>
  635. Resume editing after a suspension.
  636. </span><span style='color:#FFF'>#edit save &lt;variable&gt;</span><span style='color:#AAA'>
  637. Save the editor to the provided variable.
  638. </span><span style='color:#FFF'>#edit suspend</span><span style='color:#AAA'>
  639. Suspend editing, similar to pressing enter except that no
  640. events are triggered.
  641. </span><span style='color:#FFF'>#edit write &lt;filename</span><span style='color:#AAA'>
  642. Write the editor content to file.
  643. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #edit create {bli}{bla}{blo}
  644. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CURSOR'>cursor</a> and <a href='#MACRO'>macro</a>.
  645. <a name='EDITING'></a>
  646. </span><span style='color:#5F5'> EDITING
  647. </span><span style='color:#AAA'>
  648. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  649. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt b </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor backward word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  650. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  651. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt f </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor forward word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  652. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  653. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  654. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl a </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  655. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  656. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl b </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor backward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  657. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  658. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl c </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  659. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  660. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl d </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete or exit </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  661. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  662. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl e </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  663. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  664. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl f </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor forward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  665. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  666. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl g </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  667. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  668. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl h </span><span style='color:#0AA'>││</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  669. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  670. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl i </span><span style='color:#0AA'>││</span><span style='color:#FFF'>tab </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  671. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  672. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl j </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  673. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  674. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl k </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  675. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  676. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl l </span><span style='color:#0AA'>││</span><span style='color:#FFF'>redraw input </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  677. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  678. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl m </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  679. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  680. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl n </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history next </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  681. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  682. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl o </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  683. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  684. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl p </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history prev </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  685. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  686. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl q </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  687. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  688. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl r </span><span style='color:#0AA'>││</span><span style='color:#FFF'>input history search </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  689. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  690. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl s </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  691. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  692. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl t </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer lock </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  693. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  694. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl u </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  695. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  696. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl v </span><span style='color:#0AA'>││</span><span style='color:#FFF'>convert meta characters </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  697. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  698. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl w </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete word left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  699. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  700. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl x </span><span style='color:#0AA'>││</span><span style='color:#FFF'> </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  701. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  702. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl y </span><span style='color:#0AA'>││</span><span style='color:#FFF'>paste </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  703. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  704. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl z </span><span style='color:#0AA'>││</span><span style='color:#FFF'>suspend </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  705. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  706. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  707. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow left </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  708. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  709. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow right </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  710. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  711. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow up </span><span style='color:#0AA'>││</span><span style='color:#FFF'>previous input line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  712. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  713. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>arrow down </span><span style='color:#0AA'>││</span><span style='color:#FFF'>next input line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  714. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  715. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  716. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl arrow left </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor left word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  717. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  718. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl arrow right </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor right word </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  719. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  720. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  721. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>backspace </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  722. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  723. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>alt backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line left </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  724. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  725. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl backspace </span><span style='color:#0AA'>││</span><span style='color:#FFF'>clear line </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  726. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  727. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  728. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>delete </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  729. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  730. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl delete </span><span style='color:#0AA'>││</span><span style='color:#FFF'>delete word right </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  731. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  732. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  733. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>end </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  734. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  735. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl end </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer end </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  736. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  737. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  738. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>││</span><span style='color:#FFF'>enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  739. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  740. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>shift-enter </span><span style='color:#0AA'>││</span><span style='color:#FFF'>soft enter </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  741. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  742. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  743. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>home </span><span style='color:#0AA'>││</span><span style='color:#FFF'>cursor home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  744. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  745. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>ctrl home </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer home </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  746. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  747. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  748. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>page up </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer up </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  749. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  750. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>page down </span><span style='color:#0AA'>││</span><span style='color:#FFF'>scroll buffer down </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  751. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  752. </span><span style='color:#0AA'>┌─────────────────────────┐┌────────────────────────────────────────────┐</span><span style='color:#AAA'>
  753. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>tab </span><span style='color:#0AA'>││</span><span style='color:#FFF'>complete word forward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  754. </span><span style='color:#0AA'>├─────────────────────────┤├────────────────────────────────────────────┤</span><span style='color:#AAA'>
  755. </span><span style='color:#0AA'>│</span><span style='color:#FFF'>shift-tab </span><span style='color:#0AA'>││</span><span style='color:#FFF'>complete word backward </span><span style='color:#0AA'>│</span><span style='color:#AAA'>
  756. </span><span style='color:#0AA'>└─────────────────────────┘└────────────────────────────────────────────┘</span><span style='color:#AAA'>
  757. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CURSOR'>cursor</a>, <a href='#EDIT'>edit</a> and <a href='#MACRO'>macro</a>.
  758. <a name='ELSE'></a>
  759. </span><span style='color:#5F5'> ELSE
  760. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #else </span><span style='color:#FFF'>{</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  761. The else statement should follow an #IF or #ELSEIF statement and is
  762. only called if the proceeding #IF or #ELSEIF is false.
  763. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #if {1d2 == 1} {smile};#else {grin}
  764. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CASE'>case</a>, <a href='#DEFAULT'>default</a>, <a href='#ELSEIF'>elseif</a>, <a href='#IF'>if</a>, <a href='#SWITCH'>switch</a> and <a href='#REGEXP'>regexp</a>.
  765. <a name='ELSEIF'></a>
  766. </span><span style='color:#5F5'> ELSEIF
  767. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #elseif </span><span style='color:#FFF'>{</span><span style='color:#AAA'>conditional</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  768. The elseif statement should follow an #IF or #ELSEIF statement and is
  769. only called when the statement is true and the proceeding #IF and
  770. #ELSEIF statements are false.
  771. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #if {1d3 == 1} {smirk};#elseif {1d2 == 1} {snicker}
  772. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CASE'>case</a>, <a href='#DEFAULT'>default</a>, <a href='#ELSE'>else</a>, <a href='#IF'>if</a>, <a href='#SWITCH'>switch</a> and <a href='#REGEXP'>regexp</a>.
  773. <a name='END'></a>
  774. </span><span style='color:#5F5'> END
  775. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #end {&lt;message&gt;}
  776. Terminates tintin and return to unix. On most systems, ctrl-c has
  777. the same result.
  778. The message is optional and is printed before tintin exits. When
  779. using #end {&bsol;} tintin will terminate silently.
  780. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ZAP'>zap</a>
  781. <a name='ESCAPE CODES'></a>
  782. </span><span style='color:#5F5'> ESCAPE CODES
  783. </span><span style='color:#AAA'> You may use the escape character &bsol; for various special characters.
  784. &bsol;a beep the terminal.
  785. &bsol;c send a control character, &bsol;ca for ctrl-a.
  786. &bsol;e start an escape sequence.
  787. &bsol;f send a form feed.
  788. &bsol;n send a line feed.
  789. &bsol;r send a carriage return.
  790. &bsol;t send a horizontal tab.
  791. &bsol;x print an 8 bit character using hexadecimal, &bsol;xFF for example.
  792. &bsol;x7B send the '{' character.
  793. &bsol;x7D send the '}' character.
  794. &bsol;u print a 16 bit unicode character, &bsol;uFFFD for example.
  795. &bsol;u{} print a 8-21 bit unicode character, &bsol;u{2AF21} for example.
  796. &bsol;U print a 21 bit unicode character, &bsol;U02AF21 for example.
  797. &bsol;v send a vertical tab
  798. Ending a line with &bsol; will stop tintin from appending a line feed.
  799. To escape arguments in an alias or action use %%0 %%1 %%2 etc.
  800. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  801. <a name='EVENT'></a>
  802. </span><span style='color:#5F5'> EVENT
  803. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #event </span><span style='color:#FFF'>{</span><span style='color:#AAA'>event type</span><span style='color:#FFF'>}</span><span style='color:#AAA'> </span><span style='color:#FFF'>{</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  804. Events allow you to create triggers for predetermined client events.
  805. Use #event without an argument to see a list of possible events with
  806. a brief description. Use #event %* to see the current list of defined
  807. events. Use #info {events} {on} to see events get thrown.
  808. Events, like triggers in general, are case sensitive and event names
  809. must be defined using all upper case letters. Only one event can be
  810. defined for each event type.
  811. To enable mouse events use #config mouse_tracking on, to see mouse
  812. events use #config mouse_tracking info.
  813. </span><span style='color:#5F5'>CATCH EVENTS
  814. </span><span style='color:#FFF'>CATCH &lt;EVENT&gt;
  815. </span><span style='color:#AAA'> Some events can be prefixed with CATCH to interrupt default
  816. behavior.
  817. </span><span style='color:#5F5'>CLASS EVENTS
  818. </span><span style='color:#FFF'>CLASS ACTIVATED [CLASS], CLASS_CLEAR [CLASS], CLASS CREATED [CLASS],
  819. CLASS DEACTIVATED [CLASS], CLASS DESTROYED [CLASS],
  820. CLASS_LOAD [CLASS]
  821. </span><span style='color:#AAA'> %0 class name
  822. </span><span style='color:#5F5'>GAG EVENTS
  823. </span><span style='color:#FFF'>GAG &lt;EVENT&gt;
  824. </span><span style='color:#AAA'> Some events can be prefixed with GAG to gag default system
  825. messages.
  826. </span><span style='color:#5F5'>INPUT EVENTS</span><span style='color:#AAA'>
  827. </span><span style='color:#FFF'>EDIT STARTED, EDIT FINISHED
  828. </span><span style='color:#AAA'> %0 name %1 lines %2 size %3 data
  829. </span><span style='color:#FFF'>RECEIVED KEYPRESS, PROCESSED KEYPRESS
  830. </span><span style='color:#AAA'> %0 character %1 unicode index %2 edit row %3 edit column
  831. </span><span style='color:#FFF'>RECEIVED INPUT [NAME]
  832. </span><span style='color:#AAA'> %0 raw text
  833. </span><span style='color:#FFF'>RECEIVED INPUT CHARACTER
  834. </span><span style='color:#AAA'> %0 character %1 unicode index %2 size %3 width
  835. SEND OUTPUT %0 raw text %1 size
  836. SENT OUTPUT %0 raw text %1 size
  837. </span><span style='color:#5F5'>MAP EVENTS
  838. </span><span style='color:#FFF'>END OF PATH, END OF RUN, MAP UPDATED VTMAP
  839. </span><span style='color:#AAA'> These events have no additional arguments.
  840. </span><span style='color:#FFF'>MAP CREATE EXIT, MAP DELETE EXIT
  841. </span><span style='color:#AAA'> %0 vnum %1 exit name %2 exit cmd %3 exit vnum
  842. </span><span style='color:#FFF'>MAP CREATE ROOM, MAP DELETE ROOM
  843. </span><span style='color:#AAA'> %0 vnum %1 name
  844. </span><span style='color:#FFF'>MAP ENTER MAP, MAP EXIT MAP
  845. </span><span style='color:#AAA'> %0 vnum
  846. </span><span style='color:#FFF'>MAP ENTER ROOM [VNUM]
  847. </span><span style='color:#AAA'> %0 new vnum %1 old vnum %2 direction
  848. </span><span style='color:#FFF'>MAP EXIT ROOM [VNUM]
  849. </span><span style='color:#AAA'> %0 old vnum %1 new vnum %2 direction
  850. </span><span style='color:#FFF'>MAP FOLLOW MAP
  851. </span><span style='color:#AAA'> %0 old vnum %1 new vnum %2 exit name
  852. </span><span style='color:#FFF'>MAP REGION &lt;MOUSE&gt;, MAP ROOM &lt;MOUSE&gt;
  853. </span><span style='color:#AAA'> %0 row %1 col %2 -row %3 -col %5 vnum %6 info
  854. </span><span style='color:#5F5'>MOUSE EVENTS</span><span style='color:#AAA'>
  855. DOUBLE-CLICKED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  856. LONG-CLICKED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  857. MOVED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  858. PRESSED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  859. SHORT-CLICKED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  860. RELEASED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  861. SCROLLED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  862. TRIPLE-CLICKED &lt;MOUSE&gt; %0 row %1 col %2 -row %3 -col %4 word %5 line
  863. </span><span style='color:#FFF'>MAP &lt;MOUSE EVENT&gt;
  864. </span><span style='color:#AAA'> Mouse events can be prefixed with MAP to only trigger when the mouse
  865. event occurs inside the VT100 map region.
  866. </span><span style='color:#FFF'>SWIPED [DIR]
  867. </span><span style='color:#AAA'> %0 dir %1 button %2 row %3 col %4 -row %5 -col
  868. %6 row %7 col %8 -row %9 -col %10 rows %11 cols
  869. </span><span style='color:#5F5'>OUTPUT EVENTS
  870. </span><span style='color:#FFF'>BUFFER UPDATE, DISPLAY UPDATE
  871. </span><span style='color:#AAA'> These events have no additional arguments.
  872. RECEIVED LINE %0 raw text %1 plain text
  873. RECEIVED OUTPUT %0 raw text
  874. RECEIVED PROMPT %0 raw text %1 plain text
  875. </span><span style='color:#5F5'>PORT EVENTS
  876. </span><span style='color:#FFF'>CHAT MESSAGE, PORT MESSAGE
  877. </span><span style='color:#AAA'> %0 raw text %1 plain text
  878. </span><span style='color:#FFF'>PORT CONNECTION </span><span style='color:#AAA'>%0 name %1 ip %2 port
  879. </span><span style='color:#FFF'>PORT DISCONNECTION </span><span style='color:#AAA'>%0 name %1 ip %2 port
  880. </span><span style='color:#FFF'>PORT LOG MESSAGE </span><span style='color:#AAA'>%0 name %1 ip %2 port %3 data %4 plain data
  881. </span><span style='color:#FFF'>PORT RECEIVED MESSAGE </span><span style='color:#AAA'>%0 name %1 ip %2 port %3 data %4 plain data
  882. </span><span style='color:#5F5'>SCAN EVENTS</span><span style='color:#AAA'>
  883. SCAN CSV HEADER %0 all args %1 arg1 %2 arg2 .. %99 arg99
  884. SCAN CSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
  885. SCAN TSV HEADER %0 all args %1 arg1 %2 arg3 .. %99 arg99
  886. SCAN TSV LINE %0 all args %1 arg1 %2 arg3 .. %99 arg99
  887. </span><span style='color:#5F5'>SCREEN EVENTS</span><span style='color:#AAA'>
  888. </span><span style='color:#FFF'>SCREEN FOCUS
  889. </span><span style='color:#AAA'> %0 focus (0 or 1)
  890. SCREEN LOCATION %0 rows %1 cols %2 height %3 width
  891. </span><span style='color:#FFF'>SCREEN MOUSE LOCATION
  892. </span><span style='color:#AAA'> %0 row %1 col %2 -row %3 -col %4 pix row %5 pix col
  893. %6 -pix row %7 -pix col %8 location
  894. SCREEN RESIZE %0 rows %1 cols %2 height %3 width
  895. SCREEN SPLIT %0 top row %1 top col %2 bot row %3 bot col
  896. SCREEN UNSPLIT %0 top row %1 top col %2 bot row %3 bot col
  897. </span><span style='color:#5F5'>SESSION EVENTS</span><span style='color:#AAA'>
  898. SESSION ACTIVATED %0 name
  899. SESSION CONNECTED %0 name %1 host %2 ip %3 port
  900. SESSION CREATED %0 name %1 host %2 ip %3 port
  901. SESSION DEACTIVATED %0 name
  902. SESSION DISCONNECTED %0 name %1 host %2 ip %3 port
  903. SESSION TIMED OUT %0 name %1 host %2 ip %3 port
  904. </span><span style='color:#5F5'>SYSTEM EVENTS</span><span style='color:#AAA'>
  905. DAEMON ATTACHED %0 file %1 pid
  906. DAEMON DETACHED %0 file %1 pid
  907. PROGRAM START %0 startup arguments
  908. PROGRAM TERMINATION %0 goodbye message
  909. READ ERROR %0 filename %1 error message
  910. READ FILE %0 filename
  911. WRITE ERROR %0 filename %1 error message
  912. WRITE FILE %0 filename
  913. SYSTEM CRASH %0 message
  914. SYSTEM ERROR %0 name %1 system msg %2 error %3 error msg
  915. UNKNOWN COMMAND %0 raw text
  916. SIGUSR %0 signal
  917. </span><span style='color:#5F5'>TELNET EVENTS
  918. </span><span style='color:#FFF'>IAC &lt;EVENT&gt;
  919. </span><span style='color:#AAA'> IAC TELNET events are made visable using #config telnet info.
  920. </span><span style='color:#FFF'>IAC SB GMCP [MODULE] %0 module %1 data %2 plain data
  921. IAC SB MSSP %0 variable %1 data
  922. IAC SB MSDP %0 variable %1 data %2 plain data
  923. IAC SB MSDP [VAR] %0 variable %1 data %2 plain data
  924. IAC SB NEW-ENVIRON %0 variable %1 data %2 plain data
  925. IAC SB ZMP &lt;VAR&gt; %0 variable %1 data
  926. IAC SB &lt;VAR&gt; %0 variable %1 raw data %2 plain data
  927. </span><span style='color:#5F5'>TIME EVENTS
  928. </span><span style='color:#FFF'>DATE &lt;MONTH-DAY OF MONTH&gt; [HOUR:MINUTE], DAY [DAY OF MONTH],
  929. HOUR [HOUR], MONTH [DAY OF MONTH], TIME &lt;HOUR:MINUTE&gt;[:SECOND],
  930. WEEK [DAY OF WEEK], YEAR [YEAR]
  931. </span><span style='color:#AAA'> %0 year %1 month %2 day of week %3 day of month %4 hour
  932. %5 minute %6 second
  933. </span><span style='color:#5F5'>VARIABLE EVENTS</span><span style='color:#AAA'>
  934. VARIABLE UPDATE &lt;VAR&gt; %0 name %1 new value %2 path
  935. VARIABLE UPDATED &lt;VAR&gt; %0 name %1 new value %2 path
  936. </span><span style='color:#5F5'>VT100 EVENTS</span><span style='color:#AAA'>
  937. VT100 SCROLL REGION %0 top row %1 bot row %2 rows %3 cols %4 wrap
  938. To see all events trigger use #event info on. Since this can get
  939. rather spammy it's possible to gag event info messages.
  940. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {SESSION CONNECTED} {#read mychar.tin}
  941. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove an event with the #unevent command.
  942. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUTTON'>button</a>, <a href='#DELAY'>delay</a> and <a href='#TICKER'>ticker</a>.
  943. <a name='FOREACH'></a>
  944. </span><span style='color:#5F5'> FOREACH
  945. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #foreach </span><span style='color:#FFF'>{</span><span style='color:#AAA'>list</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  946. For each item in the provided list the foreach statement will update
  947. the given variable and execute the command part of the statement. List
  948. elements must be separated by braces or semicolons.
  949. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #foreach {bob;tim;kim} {name} {tell &dollar;name Hello}
  950. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #foreach {{bob}{tim}{kim}} {name} {tell &dollar;name Hello}
  951. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  952. <a name='FORMAT'></a>
  953. </span><span style='color:#5F5'> FORMAT
  954. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>format</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument1</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument2</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>etc</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  955. Allows you to store a string into a variable in the exact same way
  956. C's sprintf works with a few enhancements and limitations like a
  957. maximum of 30 arguments.
  958. If you use #format inside an alias or action you must escape %1s as
  959. %+1s or %%1s or %&bsol;1s so the %1 isn't substituted by the trigger.
  960. #format {test} {%+9s} {string} pad string with up to 9 spaces
  961. #format {test} {%-9s} {string} post pad string with up to 9 spaces
  962. #format {test} {%.8s} {string} copy at most 8 characters
  963. #format {test} {%a} {number} print corresponding charset character
  964. #format {test} {%c} {string} use a highlight color name
  965. #format {test} {%d} {number} print a number with integer formatting
  966. #format {test} {%f} {string} perform floating point math
  967. #format {test} {%g} {number} perform thousand grouping on {number}
  968. #format {test} {%h} {string} turn text into a header line
  969. #format {test} {%l} {string} lowercase text
  970. #format {test} {%m} {string} perform mathematical calculation
  971. #format {test} {%n} {name} capitalize the first letter
  972. #format {test} {%p} {string} strip leading and trailing spaces
  973. #format {test} {%r} {string} reverse text, hiya = ayih
  974. #format {test} {%s} {string} print given string
  975. #format {test} {%t} {format} display time with strftime format
  976. optional {{format}{time}} syntax
  977. #format {test} {%u} {string} uppercase text
  978. #format {list} {%w} {string} store word wrapped text in {list}
  979. optional {{string}{width}} syntax
  980. #format {test} {%x} {hex} print corresponding charset character
  981. #format {test} {%A} {char} store corresponding character value
  982. #format {test} {%D} {hex} convert hex to decimal in {test}
  983. #format {hash} {%H} {string} store a 64 bit string hash in {hash}
  984. #format {test} {%L} {string} store the string length in {test}
  985. #format {test} {%M} {number} convert number to metric in {test}
  986. #format {test} {%S} {string} store the number of spelling errors
  987. #format {time} {%T} {} store the epoch time in {time}
  988. #format {time} {%U} {} store the micro epoch time in {time}
  989. #format {test} {%X} {dec} convert dec to hexadecimal in {test}
  990. #format {test} {%%} a literal % character
  991. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See #help TIME for help on the %t argument.
  992. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CAT'>cat</a>, <a href='#ECHO'>echo</a>, <a href='#FUNCTION'>function</a>, <a href='#LOCAL'>local</a>, <a href='#MATH'>math</a>, <a href='#REPLACE'>replace</a>, <a href='#SCRIPT'>script</a>, <a href='#TIME'>time</a> and <a href='#VARIABLE'>variable</a>.
  993. <a name='FUNCTION'></a>
  994. </span><span style='color:#5F5'> FUNCTION
  995. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #function </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>operation</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  996. Functions allow you to execute a script within a line of text, and
  997. replace the function call with the line of text generated by the
  998. function.
  999. Be aware that each function should use the #return command at the
  1000. end of the function with the result, or set the {result} variable.
  1001. To use a function use the @ character before the function name.
  1002. The function arguments should be placed between braces behind the
  1003. function name with argument separated by semicolons.
  1004. Functions can be escaped by adding additional @ signs.
  1005. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #function test #return 42;#showme @@test{}
  1006. The function itself can use the provided arguments which are stored
  1007. in %1 to %99, with %0 holding all arguments.
  1008. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #function {rnd} {#math {result} {1 d (%2 - %1 + 1) + %1 - 1}}
  1009. #show A random number between 100 and 200: @rnd{100;200}
  1010. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #function gettime {#format result %t %H:%M}
  1011. #show The current time is @gettime{}
  1012. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a function with the #unfunction command.
  1013. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#FORMAT'>format</a>, <a href='#LOCAL'>local</a>, <a href='#MATH'>math</a>, <a href='#REPLACE'>replace</a>, <a href='#SCRIPT'>script</a> and <a href='#VARIABLE'>variable</a>.
  1014. <a name='GAG'></a>
  1015. </span><span style='color:#5F5'> GAG
  1016. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #gag </span><span style='color:#FFF'>{</span><span style='color:#AAA'>string</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1017. Removes any line that contains the string.
  1018. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help action', for more information about triggers.
  1019. There are a system messages that can be gagged using gag events.
  1020. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a gag with the #ungag command.
  1021. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ACTION'>action</a>, <a href='#HIGHLIGHT'>highlight</a>, <a href='#PROMPT'>prompt</a> and <a href='#SUBSTITUTE'>substitute</a>.
  1022. <a name='GREETING'></a>
  1023. </span><span style='color:#5F5'> GREETING
  1024. </span><span style='color:#0AA'> ####################################################################
  1025. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  1026. #</span><span style='color:#AAA'> T I N T I N + + 2.02.12 </span><span style='color:#0AA'>#
  1027. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  1028. #</span><span style='color:#AAA'> Code by Peter Unold, Bill Reis, and Igor van den Hoven </span><span style='color:#0AA'>#
  1029. #</span><span style='color:#AAA'> </span><span style='color:#0AA'>#
  1030. ####################################################################
  1031. <a name='GREP'></a>
  1032. </span><span style='color:#5F5'> GREP
  1033. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #grep </span><span style='color:#FFF'>[</span><span style='color:#AAA'>page</span><span style='color:#FFF'>] {</span><span style='color:#AAA'>search string</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1034. This command allows you to search for matching lines in your scroll
  1035. back buffer. The amount of matches shown equals your screen size. If
  1036. you want to search back further use the optional page number. You can
  1037. use wildcards for better search results. Be aware the search string
  1038. is case sensitive, which can be disabled by using %i.
  1039. By default grep searches from the end of the scrollback buffer to the
  1040. beginning, this can be reversed by using a negative page number.
  1041. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #grep Bubba tells you
  1042. This will show all occasions where bubba tells you something.
  1043. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUFFER'>buffer</a>, <a href='#ECHO'>echo</a> and <a href='#SHOWME'>showme</a>.
  1044. <a name='HELP'></a>
  1045. </span><span style='color:#5F5'> HELP
  1046. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #help </span><span style='color:#FFF'>{</span><span style='color:#AAA'>subject</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1047. Without an argument #help will list all available help subjects.
  1048. Using #help %* will display all help entries.
  1049. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COMMANDS'>commands</a>, <a href='#DEBUG'>debug</a>, <a href='#IGNORE'>ignore</a>, <a href='#INFO'>info</a>, <a href='#MESSAGE'>message</a> and <a href='#STATEMENTS'>statements</a>.
  1050. <a name='HIGHLIGHT'></a>
  1051. </span><span style='color:#5F5'> HIGHLIGHT
  1052. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #highlight </span><span style='color:#FFF'>{</span><span style='color:#AAA'>string</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>color names</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>priority</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1053. The highlight command is used to allow you to highlight strings of text.
  1054. Available color options are:
  1055. reset - resets the color state to default
  1056. light - turns the color light in 16 color mode.
  1057. dark - turns the color dark in 16 color mode.
  1058. underscore - underscores the text.
  1059. blink - makes the text blink.
  1060. reverse - reverse foreground and background color.
  1061. b - makes next color the background color.
  1062. Available color names are:
  1063. &lt;F06B&gt; - azure &lt;F08F&gt; - Azure
  1064. &lt;F00B&gt; - blue &lt;F00F&gt; - Blue
  1065. &lt;F0BB&gt; - cyan &lt;F0FF&gt; - Cyan
  1066. &lt;F000&gt; - ebony &lt;F666&gt; - Ebony
  1067. &lt;F0B0&gt; - green &lt;F0F0&gt; - Green
  1068. &lt;F0B6&gt; - jade &lt;F0F8&gt; - Jade
  1069. &lt;F6B0&gt; - lime &lt;F8F0&gt; - Lime
  1070. &lt;FB0B&gt; - magenta &lt;FF0F&gt; - Magenta
  1071. &lt;FB60&gt; - orange &lt;FF80&gt; - Orange
  1072. &lt;FB06&gt; - pink &lt;FF08&gt; - Pink
  1073. &lt;FB00&gt; - red &lt;FF00&gt; - Red
  1074. &lt;F888&gt; - silver &lt;FDDD&gt; - Silver
  1075. &lt;F860&gt; - tan &lt;FDB0&gt; - Tan
  1076. &lt;F60B&gt; - violet &lt;F80F&gt; - Violet
  1077. &lt;FBBB&gt; - white &lt;FFFF&gt; - White
  1078. &lt;FBB0&gt; - yellow &lt;FFF0&gt; - Yellow
  1079. The %1-99 variables can be used as 'wildcards' that will match with any
  1080. text. They are useful for highlighting a complete line. The %0 variable
  1081. should never be used in highlights.
  1082. You may start the string to highlight with a ^ to only highlight text
  1083. if it begins the line.
  1084. Besides color names also &lt;abc&gt; color codes can be used.
  1085. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high {Valgar} {reverse blink}
  1086. Prints every occurrence of 'Valgar' in blinking reverse video.
  1087. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high {^You %1} {bold cyan}
  1088. Boldfaces any line that starts with 'You' in cyan.
  1089. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high {Bubba} {red underscore b green}
  1090. Highlights the name Bubba as red underscored text on green background.
  1091. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help action', for more information about triggers.
  1092. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help substitute', for more advanced color substitution.
  1093. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: This command only works with ANSI/VT100 terminals or emulators.
  1094. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a highlight with the #unhighlight command.
  1095. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ACTION'>action</a>, <a href='#GAG'>gag</a>, <a href='#PROMPT'>prompt</a> and <a href='#SUBSTITUTE'>substitute</a>.
  1096. <a name='HISTORY'></a>
  1097. </span><span style='color:#5F5'> HISTORY
  1098. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #history </span><span style='color:#FFF'>{</span><span style='color:#AAA'>delete</span><span style='color:#FFF'>}</span><span style='color:#AAA'> Delete the last command.
  1099. #history </span><span style='color:#FFF'>{</span><span style='color:#AAA'>insert</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>command</span><span style='color:#FFF'>}</span><span style='color:#AAA'> Insert a command.
  1100. #history </span><span style='color:#FFF'>{</span><span style='color:#AAA'>list</span><span style='color:#FFF'>}</span><span style='color:#AAA'> Display the entire command history.
  1101. #history </span><span style='color:#FFF'>{</span><span style='color:#AAA'>read</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>filename</span><span style='color:#FFF'>}</span><span style='color:#AAA'> Read a command history from file.
  1102. #history </span><span style='color:#FFF'>{</span><span style='color:#AAA'>write</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>filename</span><span style='color:#FFF'>}</span><span style='color:#AAA'> Write a command history to file.
  1103. Without an argument all available options are shown.
  1104. By default all commands are saved to the history list and the history
  1105. list is saved between sessions in the ~/.tintin/history.txt file.
  1106. You can set the character to repeat a command in the history with the
  1107. #config {REPEAT CHAR} {&lt;character&gt;} configuration option, by default
  1108. this is set to the exclamation mark.
  1109. You can use ! by itself to repeat the last command, or !&lt;text&gt; to
  1110. repeat the last command starting with the given text.
  1111. You can use #config {REPEAT ENTER} {ON} to repeat the last command
  1112. when you press enter on an empty line.
  1113. You can press ctrl-r to enter an interactive regex enabled history
  1114. search mode, or by issuing #cursor {history search}.
  1115. TinTin++ tries to bind the arrow up and down keys to scroll through
  1116. the history list by default. You can bind these with a macro yourself
  1117. using #cursor {history next} and #cursor {history prev}. Many #cursor
  1118. commands only work properly when bound with a macro.
  1119. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#CURSOR'>cursor</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a>, <a href='#SPEEDWALK'>speedwalk</a> and <a href='#TAB'>tab</a>.
  1120. <a name='IF'></a>
  1121. </span><span style='color:#5F5'> IF
  1122. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #if </span><span style='color:#FFF'>{</span><span style='color:#AAA'>conditional</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands if true</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1123. The #if command is one of the most powerful commands added since
  1124. TINTIN III. It works similar to an if statement in other languages,
  1125. and is based on the way C handles its conditional statements.
  1126. When an #if command is encountered, the conditional statement is
  1127. evaluated, and if TRUE (any non-zero result) the commands are executed.
  1128. The if statement is only evaluated if it is read, so you must nest
  1129. the if statement inside another statement (most likely an #action
  1130. command). The conditional is evaluated exactly the same as in the
  1131. #math command, only instead of storing the result, the result is used
  1132. to determine whether to execute the commands.
  1133. To handle the case where an if statement is false it can be followed
  1134. by the #else command.
  1135. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action {%0 gives you %1 gold coins.} {#if {%1 &gt; 5000} {thank %0}}
  1136. If someone gives you more than 5000 coins, thank them.
  1137. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias {k} {#if {&quot;%0&quot; == &quot;&quot;} {kill &dollar;target};#else {kill %0}}
  1138. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help math', for more information.
  1139. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CASE'>case</a>, <a href='#DEFAULT'>default</a>, <a href='#ELSE'>else</a>, <a href='#ELSEIF'>elseif</a>, <a href='#SWITCH'>switch</a> and <a href='#REGEXP'>regexp</a>.
  1140. <a name='IGNORE'></a>
  1141. </span><span style='color:#5F5'> IGNORE
  1142. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #ignore </span><span style='color:#FFF'>{</span><span style='color:#AAA'>listname</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>on</span><span style='color:#FFF'>|</span><span style='color:#AAA'>off</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1143. Toggles a list on or off. With no arguments it shows your current
  1144. settings, as well as the list names that you can ignore.
  1145. If you for example set ACTIONS to OFF actions will no longer trigger.
  1146. Not every list can be ignored.
  1147. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a>, <a href='#DEBUG'>debug</a>, <a href='#INFO'>info</a>, <a href='#KILL'>kill</a> and <a href='#MESSAGE'>message</a>.
  1148. <a name='INDEX'></a>
  1149. </span><span style='color:#5F5'> INDEX
  1150. </span><span style='color:#AAA'> On this page you'll find an introduction to using TinTin++. Additional
  1151. information can be found in the individual help sections.
  1152. </span><span style='color:#5F5'>
  1153. Starting and Ending
  1154. </span><span style='color:#AAA'>
  1155. The syntax for starting TinTin++ is: ./tt++ [command file]
  1156. Read more about the command file in the files section below. Remember
  1157. one thing though. All actions, aliases, substitutions, etc, defined
  1158. when starting up TinTin++ are inherited by all sessions.
  1159. If you want to exit TinTin++ type '#end' or press ctrl-d on an empty
  1160. line.
  1161. For the WinTin++ users, if you want to paste text use shift-insert,
  1162. text is automatically copied upon selection. This is typical Linux
  1163. behavior, but it can take some getting used to.
  1164. </span><span style='color:#5F5'>
  1165. Basic features
  1166. </span><span style='color:#AAA'>
  1167. I'll start by explaining some of the very basic and important features:
  1168. All TinTin++ commands starts with a '#'.
  1169. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #help -- #help is a client command, and isn't send to the server.
  1170. All TinTin++ commands can be abbreviated when typed.
  1171. #he -- Typing #he is the same as typing #help though it's suggested to
  1172. use at least 3 letter abbreviations just in case another command is
  1173. added that starts with 'he'.
  1174. All commands can be separated with a ';'.
  1175. n;l green;s;say Dan Dare is back! -- do these 4 commands
  1176. There are 3 ways ';'s can be overruled.
  1177. &bsol;say Hello ;) -- Lines starting with a '&bsol;' aren't parsed by TinTin++.
  1178. say Hello &bsol;;) -- The escape character can escape 1 letter.
  1179. #config verbatim on -- Everything is send as is except '#' commands.
  1180. </span><span style='color:#5F5'>
  1181. Connecting to a server
  1182. </span><span style='color:#FFF'>
  1183. Command</span><span style='color:#AAA'>: #session </span><span style='color:#FFF'>{</span><span style='color:#AAA'>session name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>server address</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>port</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1184. Example: #session someone tintin.sourceforge.net 4321
  1185. You can have more than one session, in which case you can switch
  1186. between sessions typing #&lt;session name&gt;.
  1187. You can get a list of all sessions by typing: #session. The current
  1188. active session is marked with (active). Snooped sessions with
  1189. (snooped). MCCP sessions (compression) with (mccp 2) and (mccp 3).
  1190. </span><span style='color:#5F5'>
  1191. Split
  1192. </span><span style='color:#FFF'>
  1193. Command</span><span style='color:#AAA'>: #split
  1194. The split command will create a separated input and output area.
  1195. Using the #prompt command you can capture the prompt and place it on
  1196. the split line. To get rid of the split interface you can use #unsplit
  1197. which will restore the terminal settings to default.
  1198. </span><span style='color:#5F5'>
  1199. Alias
  1200. </span><span style='color:#FFF'>
  1201. Command</span><span style='color:#AAA'>: #alias </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1202. The syntax of the #alias command is almost like alias in csh.
  1203. Use this command to define aliases. The variables %0, %1.. %9 contain
  1204. the arguments to the aliased command as follows:
  1205. the %0 variable contains ALL the arguments.
  1206. the %1 variable contains the 1st argument
  1207. ....
  1208. the %9 variable contains the 9th argument
  1209. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias greet say Greetings, most honorable %1
  1210. If there are no variables on the right-side of the alias definition,
  1211. any arguments following the aliases-command will be appended to the
  1212. command string.
  1213. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias ff cast 'fireball' -- 'ff bob' equals: cast 'fireball' bob
  1214. If you want an alias to execute more commands, you must use braces.
  1215. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias ws </span><span style='color:#FFF'>{</span><span style='color:#AAA'>wake;stand</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1216. To delete an alias use the #unalias command.
  1217. WARNING! TinTin++ doesn't baby sit, and hence does not check for
  1218. recursive aliases! You can avoid recursion by escaping the entire
  1219. line.
  1220. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias put &bsol;put %1 in %2
  1221. Or by using the send command.
  1222. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #send put %1 in %2
  1223. </span><span style='color:#5F5'> Action
  1224. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>action-text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1225. Use this command to define an action to take place when a particular
  1226. text appears on your screen. There are 99 variables you can use as
  1227. wildcards in the action-text.
  1228. These variables are %1, %2, %3 .... %9, %10, %11 ... %97, %98, %99.
  1229. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>You are hungry</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>get bread bag;eat bread</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1230. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%1 has arrived.</span><span style='color:#FFF'>}</span><span style='color:#AAA'> shake %1 -- shake hands with people arriving.
  1231. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%1 tells you '%2'</span><span style='color:#FFF'>}
  1232. {</span><span style='color:#AAA'>tell bob %1 told me '%2'</span><span style='color:#FFF'>}</span><span style='color:#AAA'> -- forward tells.
  1233. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tells you</span><span style='color:#FFF'>}</span><span style='color:#AAA'> #bell -- beep on tell.
  1234. You can have TinTin++ ignore actions if you type '#ignore actions on'.
  1235. You can see what commands TinTin++ executes when an action triggers
  1236. by typing '#debug actions on'.
  1237. You can remove actions with the #unaction command.
  1238. </span><span style='color:#5F5'>
  1239. Highlight
  1240. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #highlight </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>color</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1241. This command works a bit like #action. The purpose of this command is
  1242. to substitute text from the server with color you provide. This command
  1243. is a simplified version of the #substitute command.
  1244. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high </span><span style='color:#FFF'>{</span><span style='color:#AAA'>Snowy</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>light yellow</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1245. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #high </span><span style='color:#FFF'>{</span><span style='color:#AAA'>%*Snowy%*</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>light yellow</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1246. Use #unhigh to delete highlights.
  1247. Speedwalk
  1248. If you type a command consisting ONLY of letters and numbers n, e, s,
  1249. w, u, d - then this command can be interpreted as a serie of movement
  1250. commands.
  1251. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: ssw2n -- go south, south, west, north, north
  1252. If you have problems with typing some commands that actually ONLY
  1253. consists of these letters, then type them in CAPS. For example when
  1254. checking the NEWS or when asked to enter NEW as your name.
  1255. You must enable speedwalking with: #config speedwalk on/off.
  1256. </span><span style='color:#5F5'>
  1257. Ticker
  1258. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #ticker </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>seconds</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1259. The name can be whatever you want it to be, and is only required for
  1260. the unticker command. The commands will be executed every x amount of
  1261. seconds, which is specified in the interval part.
  1262. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #tick </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tick</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>#delay 50 #show 10 SECONDS TO TICK!;#show TICK!!!</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>60</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1263. This creates a ticker with the name </span><span style='color:#FFF'>{</span><span style='color:#AAA'>tick</span><span style='color:#FFF'>}</span><span style='color:#AAA'> which will print TICK!!!,
  1264. as well as print a warning when the next tick will occure.
  1265. You can remove tickers with #untick
  1266. </span><span style='color:#5F5'>
  1267. Command files
  1268. </span><span style='color:#AAA'>
  1269. When you order TinTin++ to read a command file, it parses all the text
  1270. in the file. You can use command files to keep aliases/actions in,
  1271. login to a server (name, password etc..) and basically all kinds of
  1272. commands.
  1273. You can make the command files with either a text editor (suggested),
  1274. or use the #write command to write out a file.
  1275. Commands for files:
  1276. #read filename -- read and execute the file.
  1277. #write filename -- write all actions/aliases/substitutes/etc known for
  1278. the current session to a file.
  1279. </span><span style='color:#5F5'>
  1280. Repeating Commands
  1281. </span><span style='color:#AAA'>
  1282. You can repeat a command, the syntax is: #number command
  1283. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #5 cackle -- if you just killed bob the wizard.
  1284. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #10 </span><span style='color:#FFF'>{</span><span style='color:#AAA'>buy bread;put bread bag</span><span style='color:#FFF'>}</span><span style='color:#AAA'> -- repeat these 2 commands 10 times.
  1285. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #100 ooc w00t w00t!!!!! -- nochannel yourself.
  1286. </span><span style='color:#5F5'>
  1287. History
  1288. </span><span style='color:#AAA'>
  1289. TinTin++ has a limited subset of the csh history features.
  1290. ! -- repeat the last command
  1291. !cast -- repeat the last command starting with cast
  1292. ctrl-r -- enter the reverse history search mode.
  1293. </span><span style='color:#5F5'>
  1294. Map commands
  1295. </span><span style='color:#AAA'>
  1296. TinTin++ has a powerful highly configurable automapper. Whenever
  1297. you type n/ne/e/se/s/sw/w/nw/n/u/d tt++ tries to keep track of your
  1298. movement.
  1299. Commands for map:
  1300. #map create -- create a map.
  1301. #map goto 1 -- go to the first room in the map, created by default.
  1302. #map map -- display the map.
  1303. #map undo -- undo your last map alteration.
  1304. #map write &lt;filename&gt; -- save the map to file.
  1305. #map read &lt;filename&gt; -- load a map from file.
  1306. There are many other map options and it's beyond the scope of this
  1307. help section to explain everything there is to know, but I'll give
  1308. a set of commands that will get most people started.
  1309. #map create
  1310. #split 12 1
  1311. #map flag unicode on
  1312. #map flag vt on
  1313. #map goto 1
  1314. These commands will create a 12 row vt100 split section at the top of
  1315. your screen where a map drawn using unicode characters is displayed.
  1316. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action </span><span style='color:#FFF'>{</span><span style='color:#AAA'>There is no exit in that direction.</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>#map undo</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1317. The map will be automatically created as you move around.
  1318. </span><span style='color:#5F5'>
  1319. Help
  1320. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #help </span><span style='color:#FFF'>{</span><span style='color:#AAA'>subject</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1321. The help command is your friend and contains the same helpfiles
  1322. inside TinTin++ as are available on the website. If you type #help
  1323. without an argument you will see the various available help subjects
  1324. which try to explain the TinTin++ commands and features in greater
  1325. detail.
  1326. </span><span style='color:#5F5'>
  1327. Enjoy</span><span style='color:#AAA'>
  1328. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CHARACTERS'>characters</a>, <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#EDITING'>editing</a>, <a href='#ESCAPE_CODES'>escape_codes</a>, <a href='#GREETING'>greeting</a>, <a href='#KEYPAD'>keypad</a>, <a href='#LISTS'>lists</a>, <a href='#MAPPING'>mapping</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#SCREEN_READER'>screen_reader</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SPEEDWALK'>speedwalk</a>, <a href='#STATEMENTS'>statements</a>, <a href='#SUSPEND'>suspend</a> and <a href='#TIME'>time</a>.
  1329. <a name='INFO'></a>
  1330. </span><span style='color:#5F5'> INFO
  1331. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #info </span><span style='color:#FFF'>{</span><span style='color:#AAA'>listname</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>LIST</span><span style='color:#FFF'>|</span><span style='color:#AAA'>ON</span><span style='color:#FFF'>|</span><span style='color:#AAA'>OFF</span><span style='color:#FFF'>|</span><span style='color:#AAA'>SAVE</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1332. Without an argument info displays the settings of every tintin list.
  1333. By providing the name of a list and the LIST option it shows all
  1334. triggers/variables associated with that list. With the SAVE option
  1335. this data is written to the info variable.
  1336. #info cpu will show information about tintin's cpu usage.
  1337. #info environ will show the environment variables.
  1338. #info input will show information about the input line.
  1339. #info mccp will show information about data compression.
  1340. #info memory will show information about the memory stack.
  1341. #info stack will show the low level debugging stack.
  1342. #info session will show information on the session.
  1343. #info sessions will show information on all sessions.
  1344. #info system will show some system information.
  1345. #info tokenizer will show information about the script stack.
  1346. #info unicode will show information on the provided character.
  1347. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a>, <a href='#DEBUG'>debug</a>, <a href='#IGNORE'>ignore</a>, <a href='#KILL'>kill</a> and <a href='#MESSAGE'>message</a>.
  1348. <a name='KEYPAD'></a>
  1349. </span><span style='color:#5F5'> KEYPAD
  1350. </span><span style='color:#AAA'>When TinTin++ starts up it sends &bsol;e= to the terminal to enable the terminal's
  1351. application keypad mode, which can be disabled using #show {&bsol;e&gt;}
  1352. </span><span style='color:#FFF'> Configuration A Configuration B Configuration C</span><span style='color:#0AA'>
  1353. ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────╮
  1354. │</span><span style='color:#FFF'>num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>-</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>-</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>Num</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp/</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp*</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp-</span><span style='color:#0AA'> │
  1355. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  1356. │</span><span style='color:#FFF'>7</span><span style='color:#0AA'> │</span><span style='color:#FFF'>8</span><span style='color:#0AA'> │</span><span style='color:#FFF'>9</span><span style='color:#0AA'> │</span><span style='color:#FFF'>+</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>Home</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Up</span><span style='color:#0AA'> │</span><span style='color:#FFF'>PgUp</span><span style='color:#0AA'> │</span><span style='color:#FFF'>+</span><span style='color:#0AA'> │ │</span><span style='color:#FFF'>nkp7</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp8</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp9</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp+</span><span style='color:#0AA'> │
  1357. ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │ ├─────┼─────┼─────┤ │
  1358. │</span><span style='color:#FFF'>4</span><span style='color:#0AA'> │</span><span style='color:#FFF'>5</span><span style='color:#0AA'> │</span><span style='color:#FFF'>6</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>Left</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Cntr</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Right</span><span style='color:#0AA'>│ │ │</span><span style='color:#FFF'>nkp4</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp5</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp6</span><span style='color:#0AA'> │ │
  1359. ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
  1360. │</span><span style='color:#FFF'>1</span><span style='color:#0AA'> │</span><span style='color:#FFF'>2</span><span style='color:#0AA'> │</span><span style='color:#FFF'>3</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Enter</span><span style='color:#0AA'>│ │</span><span style='color:#FFF'>End</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Down</span><span style='color:#0AA'> │</span><span style='color:#FFF'>PgDn</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Enter</span><span style='color:#0AA'>│ │</span><span style='color:#FFF'>nkp1</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp2</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp3</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkpEn</span><span style='color:#0AA'>│
  1361. ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │ ├─────┴─────┼─────┤ │
  1362. │</span><span style='color:#FFF'>0</span><span style='color:#0AA'> │</span><span style='color:#FFF'>.</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>Ins</span><span style='color:#0AA'> │</span><span style='color:#FFF'>Del</span><span style='color:#0AA'> │ │ │</span><span style='color:#FFF'>nkp0</span><span style='color:#0AA'> │</span><span style='color:#FFF'>nkp.</span><span style='color:#0AA'> │ │
  1363. ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯ ╰───────────┴─────┴─────╯
  1364. </span><span style='color:#AAA'>
  1365. With keypad mode disabled numlock on will give you configuration A, and numlock
  1366. off will give you configuration B. With keypad mode enabled you'll get
  1367. configuration C.
  1368. </span><span style='color:#FFF'>Terminals that support keypad mode
  1369. </span><span style='color:#AAA'>Linux Console, PuTTY, Eterm, aterm.
  1370. </span><span style='color:#FFF'>Terminals that do not support keypad mode
  1371. </span><span style='color:#AAA'>RXVT on Cygwin, Windows Console, Gnome Terminal, Konsole.
  1372. </span><span style='color:#FFF'>Peculiar Terminals
  1373. </span><span style='color:#AAA'>RXVT requires turning off numlock to enable configuration C.
  1374. Xterm may require disabling Alt/NumLock Modifiers (num-lock) in the ctrl-left
  1375. click menu. Or edit ~/.Xresources and add XTerm*VT100.numLock:false
  1376. Mac OS X Terminal requires enabling 'strict vt100 keypad behavior' in
  1377. Terminal -&gt; Window Settings -&gt; Emulation.
  1378. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COLORS'>colors</a>, <a href='#COORDINATES'>coordinates</a>, <a href='#ESCAPE'>escape</a>, <a href='#MATHEMATICS'>mathematics</a> and <a href='#PCRE'>pcre</a>.
  1379. <a name='KILL'></a>
  1380. </span><span style='color:#5F5'> KILL
  1381. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #kill </span><span style='color:#FFF'>{</span><span style='color:#AAA'>list</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>pattern</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1382. Without an argument, the kill command clears all lists. Useful if
  1383. you don't want to exit tintin to reload your command files.
  1384. With one argument a specific list can be cleared.
  1385. With two arguments the triggers in the chosen list that match the
  1386. given pattern will be removed.
  1387. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #kill alias %*test*
  1388. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a>, <a href='#DEBUG'>debug</a>, <a href='#IGNORE'>ignore</a>, <a href='#INFO'>info</a> and <a href='#MESSAGE'>message</a>.
  1389. <a name='LINE'></a>
  1390. </span><span style='color:#5F5'> LINE
  1391. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #line </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1392. </span><span style='color:#5F5'>Line options that alter the argument.
  1393. </span><span style='color:#FFF'>#line strip &lt;argument&gt;
  1394. </span><span style='color:#AAA'> Argument is executed with all color codes stripped.
  1395. </span><span style='color:#FFF'>#line substitute &lt;options&gt; &lt;argument&gt;
  1396. </span><span style='color:#AAA'> Argument is executed using the provided substitutions, available
  1397. options are: arguments, braces, colors, escapes, functions, secure,
  1398. and variables.
  1399. </span><span style='color:#5F5'>Line options that alter how the line is executed.
  1400. </span><span style='color:#FFF'>#line background &lt;argument&gt;
  1401. </span><span style='color:#AAA'> Prevent new session activation.
  1402. </span><span style='color:#FFF'>#line capture &lt;variable&gt; &lt;argument.
  1403. </span><span style='color:#AAA'> Argument is executed and output stored in &lt;variable&gt;.
  1404. </span><span style='color:#FFF'>#line convert &lt;argument&gt;
  1405. </span><span style='color:#AAA'> Argument is executed with escaped meta characters.
  1406. </span><span style='color:#FFF'>#line debug &lt;argument&gt;
  1407. </span><span style='color:#AAA'> Argument is executed in debug mode.
  1408. </span><span style='color:#FFF'>#line gag
  1409. </span><span style='color:#AAA'> Gag the next line.
  1410. </span><span style='color:#FFF'>#line ignore {argument}
  1411. </span><span style='color:#AAA'> Argument is executed without any triggers being checked.
  1412. </span><span style='color:#FFF'>#line local {argument}
  1413. </span><span style='color:#AAA'> Argument is executed with all newly and indirectly
  1414. created variables being local.
  1415. </span><span style='color:#FFF'>#line log &lt;filename&gt; [text]
  1416. </span><span style='color:#AAA'> Log the next line to file unless the [text] argument is
  1417. provided.
  1418. </span><span style='color:#FFF'>#line logmode &lt;option&gt; &lt;argument&gt;
  1419. </span><span style='color:#AAA'> Argument is executed using the provided logmode, available
  1420. modes are: html, plain, and raw.
  1421. </span><span style='color:#FFF'>#line msdp &lt;argument&gt;
  1422. </span><span style='color:#AAA'> Turn the argument into an msdp telnet sequence, starting at the
  1423. first opening brace. Will turn tintin tables into msdp tables,
  1424. with semicolons being used to create msdp arrays.
  1425. </span><span style='color:#FFF'>#line multishot &lt;number&gt; &lt;argument&gt;
  1426. </span><span style='color:#AAA'> Argument is executed in multishot mode, all triggers created
  1427. will only fire the given number of times.
  1428. </span><span style='color:#FFF'>#line oneshot &lt;argument&gt;
  1429. </span><span style='color:#AAA'> Argument is executed in oneshot mode, all triggers created will
  1430. only fire once.
  1431. </span><span style='color:#FFF'>#line quiet &lt;argument&gt;
  1432. </span><span style='color:#AAA'> Argument is executed with suppression of most system messages.
  1433. </span><span style='color:#FFF'>#line verbatim &lt;argument&gt;
  1434. </span><span style='color:#AAA'> Argument is executed verbatim, prohibiting variable and function
  1435. substitutions.
  1436. </span><span style='color:#FFF'>#line verbose &lt;argument&gt;
  1437. </span><span style='color:#AAA'> Argument is executed with most system messages enabled.
  1438. When using #line log and logging in html format use &bsol;c&lt; &bsol;c&gt; &bsol;c&amp; &bsol;c&quot; to
  1439. log a literal &lt; &gt; &amp; and &quot;.
  1440. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a> and <a href='#CONFIG'>config</a>.
  1441. <a name='LIST'></a>
  1442. </span><span style='color:#5F5'> LIST
  1443. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #list </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1444. #list {var} {add} {item} Add {item} to the list
  1445. #list {var} {clear} Empty the given list
  1446. #list {var} {collapse} Turn list into a variable
  1447. #list {var} {create} {item} Create a list using {items}
  1448. #list {var} {delete} {index} {number} Delete the item at {index},
  1449. the {number} is optional.
  1450. #list {var} {explode} Turn list into a character list
  1451. #list {var} {indexate} Index a list table for sorting
  1452. #list {var} {insert} {index} {string} Insert {string} at given index
  1453. #list {var} {filter} {keep} {remove} Filter with keep / remove regex
  1454. #list {var} {find} {regex} {variable} Return the found index
  1455. #list {var} {get} {index} {variable} Copy an item to {variable}
  1456. #list {var} {order} {string} Insert item in numerical order
  1457. #list {var} {shuffle} Shuffle the list
  1458. #list {var} {set} {index} {string} Change the item at {index}
  1459. #list {var} {simplify} {string} Turn list into a simple list
  1460. #list {var} {size} {variable} Copy list size to {variable}
  1461. #list {var} {sort} {string} Insert item in alphabetic order
  1462. #list {var} {tokenize} {string} Create a character list
  1463. The index should be between 1 and the list's length. You can also give
  1464. a negative value, in which case -1 equals the last item in the list, -2
  1465. the second last, etc.
  1466. When inserting an item a positive index will prepend the item at the
  1467. given index, while a negative index will append the item.
  1468. The add and create options allow using multiple items, as well
  1469. as semicolon separated items.
  1470. A length of 0 is returned for an empty or non existant list.
  1471. You can directly access elements in a list variable using &dollar;var[1],
  1472. &dollar;var[2], &dollar;var[-1], etc.
  1473. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  1474. <a name='LISTS'></a>
  1475. </span><span style='color:#5F5'> LISTS
  1476. </span><span style='color:#AAA'> There are several different types of lists in tintin which behave in a
  1477. fairly universal manner. To properly explain lists it's easiest to
  1478. explain the most basic variable type first before discussing more
  1479. complex types.
  1480. - Basic variable: The standard key = value variable.
  1481. - Simple list: A string that contains semicolon delimited fields.
  1482. {a;b;c}. Can be saved as a variable.
  1483. - Brace list: A string in which fields are delimited with braces.
  1484. {a}{b}{c}. Brace lists cannot be stored as a variable because tables
  1485. use braces as well, they must be stored as a simple list instead.
  1486. - Table: Think of this as variables nested within another variable. Or
  1487. as variables contained within another variable.
  1488. - List: A table that uses integers for its indexes. Also known as an
  1489. array. The #list command is a utility command for using tables as
  1490. arrays.
  1491. </span><span style='color:#5F5'>
  1492. Simple Variables
  1493. </span><span style='color:#AAA'>
  1494. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  1495. #variable {simple} {Hello World!}
  1496. #show &dollar;simple
  1497. To see if the 'simple' variable exists you can use &amp;simple which will
  1498. display 0 if the variable does not exist, or the variable's index if
  1499. it exists.
  1500. If you have multiple variables they are sorted alphabetically and
  1501. numerically. While it's not all that relevant for simple variables,
  1502. the first variable has index 1, the second variable index 2, and so
  1503. on.
  1504. Variable names need to start with a letter and only exist of letters,
  1505. numbers, and underscores. If you need to use a non standard variable
  1506. name this is possible using braces.
  1507. </span><span style='color:#FFF'>Example: </span><span style='color:#AAA'>#variable {:)} {Happy Happy!};#show &dollar;{:)}
  1508. Variables can be accessed using their index. While primarily useful
  1509. for tables it is possible to do this for simple variables. Use +1 for
  1510. the first variable, +2 for the second variable, etc. Use -1 for the
  1511. last variable, -2 for the second last variable, etc.
  1512. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #show The first variable is: &dollar;{+1}
  1513. </span><span style='color:#5F5'>
  1514. Removing Variables
  1515. </span><span style='color:#AAA'>
  1516. To remove a variable, use #unvariable or #unvar (every command can be
  1517. abbreviated). It's possible to remove multiple variables at once
  1518. using #unvar {var 1} {var 2} {etc}
  1519. Variables are unique to each session, so if you have multiple
  1520. sessions, removing a variable from one session won't remove it from
  1521. other sessions.
  1522. If you remove a table variable, all variables contained within that
  1523. table variable are removed as well.
  1524. </span><span style='color:#5F5'>
  1525. Simple Lists
  1526. </span><span style='color:#AAA'>
  1527. A simple list is a string that contains semicolon delimited fields.
  1528. Commands can be entered as simple lists, for example:
  1529. #show {a};#show {b} will execute a single line as two commands.
  1530. Several commands take a simple list as their input, these are:
  1531. #foreach, #line substitute, #path load, #list create, and #highlight.
  1532. </span><span style='color:#5F5'>
  1533. Brace Lists
  1534. </span><span style='color:#AAA'>
  1535. A brace list is a string in which fields are delimited with braces.
  1536. Most commands take a brace list for their arguments, for example:
  1537. #session {x} {mud.com} {1234} {mud.tin}. The session command takes
  1538. 4 arguments, the 4th argument (command file) is optional.
  1539. Commands that take a simple list as their input will also accept a
  1540. brace list, keep in mind you'll have to embed the brace list in an
  1541. extra set of braces, for example: #path load {{n}{s}{w}{w}}, which is
  1542. identical to: #path load {n;s;w;w}.
  1543. Brace lists cannot be stored as variables because TinTin++ will
  1544. confuse them with tables. You can convert a brace list to a table
  1545. variable using: #list {bracelist} {create} {{a}{b}{c}} this will look
  1546. internally as: {{1}{a}{2}{b}{3}{c}}. You can then convert this table
  1547. to a simple list using: #list {bracelist} {simplify} {simplelist}
  1548. which will store {a;b;c} in the &dollar;simplelist variable.
  1549. Braces cannot easily be escaped in TinTin++. Using &bsol;{ or &bsol;} will not
  1550. work. The reason for this is due to several factors, but primarily
  1551. backward compatibility. To escape braces you must define them using
  1552. hexadecimal notation using &bsol;x7B and &bsol;x7D. See #help escape for a list
  1553. of escape options, and the help file will also remind you of how to
  1554. escape braces.
  1555. </span><span style='color:#5F5'>
  1556. Tables
  1557. </span><span style='color:#AAA'>
  1558. Tables are key/value pairs stored within a variable. Tables are also
  1559. known as associative arrays, dictionaries, maps, nested variables,
  1560. structures, and probably a couple of other names. There are several
  1561. ways to create and access tables.
  1562. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #variable {friendlist} {{bob}{bob@mail.com} {bubba}{sunset@gmail.com}}
  1563. This will create a friendlist with two entries, the key is the name of
  1564. the friend, the value is the email address of the friend. You can see
  1565. the email address of bob using: #show {&dollar;friendlist[bob]}. You can
  1566. also define this table as following:
  1567. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  1568. #variable {friendlist[bob]} {bob@mail.com}
  1569. #variable {friendlist[bubba]} {sunset@gmail.com}
  1570. This would create the exact same table as the single line declaration
  1571. used previously. To see the first key in the table use:
  1572. *friendlist[+1], to see the first value in the table use:
  1573. &dollar;friendlist[+1]. To see the size of the table use &amp;friendlist[]. To
  1574. print a bracelist of all friends use *friendlist[%*], to print a
  1575. bracelist of all friends whose name starts with the letter 'a' you
  1576. would use: *friendlist[a%*]. Similarly to see the number of friends
  1577. you have whose name ends with the letter 'b' you would use:
  1578. &amp;friendlist[%*b].
  1579. See #help regexp for a brief overview of regular expression options.
  1580. While TinTin++ supports PCRE (perl-compatible regular expressions), it
  1581. embeds them within its own regular expression syntax that is simpler
  1582. and less invasive, while still allowing the full power of PCRE for
  1583. those who need it.
  1584. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #unvariable {friendlist[bubba]}
  1585. This would remove {bubba} from the friendlist. To remove the entire
  1586. friendlist you would use: #unvariable {friendlist}.
  1587. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #variable {friendlist} {{bob} {{email}{bob@ma.il} {phone}{123456789}}}
  1588. There is no limit to the number of nests, simply add more braces. To
  1589. see Bob's email in this example you would use:
  1590. #show {&dollar;friendlist[bob][email]}.
  1591. Lists
  1592. Tables are sorted alphabetically with the exception of numbers which
  1593. are sorted numerically. If you want to determine the sorting order
  1594. yourself you can use use the #list command which helps you to use
  1595. tables as arrays.
  1596. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #action {%1 chats %2} {#list chats add {%0}}
  1597. Each time a chat is received it's added to the end of the 'chats' list
  1598. variable. If you type #variable chats this might look like:
  1599. </span><span style='color:#FF5'>#</span><span style='color:#5FF'>VARIABLE </span><span style='color:#A0A'>{</span><span style='color:#FFF'>chats</span><span style='color:#A0A'>}
  1600. {
  1601. {</span><span style='color:#FFF'>1</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bubba chats Hi</span><span style='color:#A0A'>}
  1602. {</span><span style='color:#FFF'>2</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bob chats Hi bub</span><span style='color:#A0A'>}
  1603. {</span><span style='color:#FFF'>3</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bubba chats Bye</span><span style='color:#A0A'>}
  1604. {</span><span style='color:#FFF'>4</span><span style='color:#A0A'>} {</span><span style='color:#FFF'>Bob chats bub bye</span><span style='color:#A0A'>}
  1605. }
  1606. </span><span style='color:#5F5'>
  1607. Parsing
  1608. </span><span style='color:#AAA'>
  1609. There are various ways to parse lists and tables, using either #loop,
  1610. #foreach, #while, or #&lt;number&gt;.
  1611. #loop takes two numeric arguments, incrementing or decrementing the
  1612. first number until it matches the second number. The value of the loop
  1613. counter is stored in the provided variable.
  1614. #foreach takes either a simple list or a brace list as its first
  1615. argument. Foreach will go through each item in the list and store the
  1616. value in the provided variable.
  1617. #while will perform an if check on the first argument, if the result
  1618. is true it will execute the commands in the second argument. Then it
  1619. performs an if check on the first argument again. It will continue to
  1620. repeat until the if check returns 0 or the loop is interrupted with a
  1621. control flow command. It takes special care to avoid infinite loops.
  1622. #&lt;number&gt; will execute the provided argument 'number' times. For
  1623. example: #4 {#show beep! &bsol;a}
  1624. Here are some examples.
  1625. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #list friends create {bob;bubba;zorro}
  1626. Internally this looks like {{1}{bob}{2}{bubba}{3}{zorro}} and the
  1627. list can be parsed in various ways.
  1628. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #foreach {&dollar;friends[%*]} {name} {#show &dollar;name}
  1629. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #foreach {*friends[%*]} {i} {#show &dollar;friends[&dollar;i]}
  1630. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #loop {1} {&amp;friends[]} {i} {#show &dollar;friends[+&dollar;i]}
  1631. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #math i 1;#while {&amp;friends[+&dollar;i]} {#show &dollar;friends[+&dollar;i];
  1632. #math i &dollar;i + 1}
  1633. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'> #math i 1;#&amp;friends[] {#show &dollar;friends[+&dollar;i];#math i &dollar;i + 1}
  1634. Each of the five examples above performs the same task; printing the
  1635. three names in the friends list.
  1636. If you want to get a better look at what goes on behind the scenes
  1637. while executing scripts you can use '#debug all on'. To stop seeing
  1638. debug information use '#debug all off'.
  1639. </span><span style='color:#5F5'>
  1640. Optimization
  1641. </span><span style='color:#AAA'>
  1642. TinTin++ tables are exceptionally fast while they remain under 100
  1643. items. Once a table grows beyond 10000 items there can be performance
  1644. issues when inserting and removing items in the beginning or middle of
  1645. the table.
  1646. The plan is to eventually implement an indexable and flexible data
  1647. structure for large tables.
  1648. If you load a large table from file it's important to make sure it's
  1649. sorted, when using #write to save a table it's automatically sorted.
  1650. If you notice performance issues on large tables it's relatively easy
  1651. to create a hash table.
  1652. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  1653. #alias {sethash}
  1654. {
  1655. #format hash %H %1;
  1656. #math hash1 &dollar;hash % 100;
  1657. #math hash2 &dollar;hash / 100 % 100;
  1658. #var hashtable[&dollar;hash1][&dollar;hash2][%1] %2
  1659. }
  1660. #function {gethash}
  1661. {
  1662. #format hash %H %1;
  1663. #math hash1 &dollar;hash % 100;
  1664. #math hash2 &dollar;hash / 100 % 100;
  1665. #return &dollar;hashtable[&dollar;hash1][&dollar;hash2][%1]
  1666. }
  1667. #alias {test}
  1668. {
  1669. sethash bli hey;
  1670. sethash bla hi;
  1671. sethash blo hello;
  1672. #show The value of bla is: @gethash{bla}
  1673. }
  1674. The above script will rapidly store and retrieve over 1 million items.
  1675. Looping through a hash table is relatively easy as well.
  1676. </span><span style='color:#FFF'>Example:</span><span style='color:#AAA'>
  1677. #alias {showhash}
  1678. {
  1679. #foreach {*hashtable[%*]} {hash1}
  1680. {
  1681. #foreach {*hashtable[&dollar;hash1][%*]} {hash2}
  1682. {
  1683. #echo {%-20s = %s}
  1684. {hashtable[&dollar;hash1][&dollar;hash2]}
  1685. {&dollar;hashtable[&dollar;hash1][&dollar;hash2]}
  1686. }
  1687. }
  1688. }
  1689. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  1690. <a name='LOCAL'></a>
  1691. </span><span style='color:#5F5'> LOCAL
  1692. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #local </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>text to fill variable</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1693. The local command sets a local variable. Unlike a regular variable
  1694. a local variable will only stay in memory for the duration of the
  1695. event that created it. They are accessed in the same way as a
  1696. regular variable.
  1697. Commands that store information to a variable will use a local variable
  1698. if it exists.
  1699. Avoid setting the result variable as local in a function.
  1700. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias {swap} {#local x %0;#replace x {e} {u};#show &dollar;x}
  1701. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a local variable with the #unlocal command.
  1702. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#FORMAT'>format</a>, <a href='#FUNCTION'>function</a>, <a href='#MATH'>math</a>, <a href='#REPLACE'>replace</a>, <a href='#SCRIPT'>script</a> and <a href='#VARIABLE'>variable</a>.
  1703. <a name='LOG'></a>
  1704. </span><span style='color:#5F5'> LOG
  1705. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #log </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1706. The log command allows logging session output to file. You can set the
  1707. data type to either plain, raw, or html with the config command.
  1708. </span><span style='color:#FFF'>#log append &lt;filename&gt;
  1709. </span><span style='color:#AAA'> Start logging to the given file, if the file already exists it won't
  1710. be overwritten and data will be appended to the end.
  1711. </span><span style='color:#FFF'>#log move &lt;filename_1&gt; &lt;filename_2&gt;
  1712. </span><span style='color:#AAA'> Move filename_1 to filename_2. This can be any file and doesn't need
  1713. to be a log file.
  1714. </span><span style='color:#FFF'>#log overwrite &lt;filename&gt;
  1715. </span><span style='color:#AAA'> Start logging to the given file, if the file already exists it will
  1716. be overwritten.
  1717. </span><span style='color:#FFF'>#log off
  1718. </span><span style='color:#AAA'> Stop logging.
  1719. </span><span style='color:#FFF'>#log remove &lt;filename&gt;
  1720. </span><span style='color:#AAA'> Remove the file. This can be any file and doesn't need to be a log
  1721. file.
  1722. </span><span style='color:#FFF'>#log timestamp &lt;format&gt;
  1723. </span><span style='color:#AAA'> When set the timestamp will be prepended to each line logged to file.
  1724. The format will be formatted as a date using the strftime format
  1725. specifiers as described in #help time.
  1726. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#READ'>read</a>, <a href='#SCAN'>scan</a>, <a href='#TEXTIN'>textin</a>, <a href='#TIME'>time</a> and <a href='#WRITE'>write</a>.
  1727. <a name='LOOP'></a>
  1728. </span><span style='color:#5F5'> LOOP
  1729. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #loop </span><span style='color:#FFF'>{</span><span style='color:#AAA'>&lt;start&gt;</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>&lt;finish&gt;</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>&lt;variable&gt;</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1730. Like a for statement, loop will loop from start to finish incrementing
  1731. or decrementing by 1 each time through. The value of the loop counter
  1732. is stored in the provided variable, which you can use in the commands.
  1733. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #loop 1 3 loop {get all &dollar;loop.corpse}
  1734. This equals 'get all 1.corpse;get all 2.corpse;get all 3.corpse'.
  1735. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #loop 3 1 cnt {drop &dollar;cnt&bsol;.key}
  1736. This equals 'drop 3.key;drop 2.key;drop 1.key'.
  1737. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  1738. <a name='MACRO'></a>
  1739. </span><span style='color:#5F5'> MACRO
  1740. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #macro </span><span style='color:#FFF'>{</span><span style='color:#AAA'>key sequence</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  1741. Macros allow you to make tintin respond to function keys.
  1742. The key sequence send to the terminal when pressing a function key
  1743. differs for every OS and terminal. To find out what sequence is send
  1744. you can enable the CONVERT META config option.
  1745. Another option is pressing ctrl-v, which will enable CONVERT META for
  1746. the next key pressed.
  1747. If you only want a key sequence to trigger at the start of an input
  1748. line prefix the key sequence with ^.
  1749. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #macro {(press ctrl-v)(press F1)} {#show &bsol;e[2J;#buffer lock}
  1750. Clear the screen and lock the window when you press F1, useful when the
  1751. boss is near.
  1752. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #macro {&bsol;eOM} {#cursor enter}
  1753. Makes the keypad's enter key work as an enter in keypad mode.
  1754. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #macro {^nn} {n}
  1755. Makes pressing n twice on an empty line execute north.
  1756. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: Not all terminals properly initialize the keypad key sequences.
  1757. If this is the case you can still use the keypad, but instead of the
  1758. arrow keys use ctrl b, f, p, and n.
  1759. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a macro with the #unmacro command.
  1760. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#CURSOR'>cursor</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#SPEEDWALK'>speedwalk</a> and <a href='#TAB'>tab</a>.
  1761. <a name='MAP'></a>
  1762. </span><span style='color:#5F5'> MAP
  1763. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #map
  1764. The map command is the backbone of the auto mapping feature.
  1765. </span><span style='color:#FFF'>#map at &lt;exit|vnum&gt; &lt;command&gt;
  1766. </span><span style='color:#AAA'> Execute the command at the given exit or vnum.
  1767. </span><span style='color:#FFF'>#map center &lt;x&gt; &lt;y&gt; &lt;z&gt;
  1768. </span><span style='color:#AAA'> Sets displaying center of the map viewer, default is 0 0 0.
  1769. </span><span style='color:#FFF'>#map color &lt;field&gt; [value]
  1770. </span><span style='color:#AAA'> Sets the map color for the given color field. Use #map color reset
  1771. to restore colors to default.
  1772. </span><span style='color:#FFF'>#map create &lt;size&gt;
  1773. </span><span style='color:#AAA'> Creates a new map and room 1. The default size is 50000 rooms.
  1774. </span><span style='color:#FFF'>#map destroy {area|world} &lt;name&gt;
  1775. </span><span style='color:#AAA'> Deletes the map or given area.
  1776. </span><span style='color:#FFF'>#map delete &lt;exit|vnum&gt;
  1777. </span><span style='color:#AAA'> Deletes the room for the given exit or vnum.
  1778. </span><span style='color:#FFF'>#map dig &lt;exit|vnum&gt; [new|&lt;vnum&gt;]
  1779. </span><span style='color:#AAA'> Creates an exit for the given exit name. If no valid exit name
  1780. is given or no existing room is found a new room is created.
  1781. Useful for portal links and other alternative forms of
  1782. transportation. If the 'new' argument is provided all existing
  1783. rooms are ignored and a new room is created. If a room vnum is
  1784. given as the second argument an exit will be created leading
  1785. to the given room vnum. If the room vnum doesn't exist a new
  1786. room is created.
  1787. </span><span style='color:#FFF'>#map entrance &lt;exit&gt; [option] [arg]
  1788. </span><span style='color:#AAA'> Set the entrance data for the given exit. You must specify a
  1789. valid two-way exit for this to work.
  1790. </span><span style='color:#FFF'>#map exit &lt;exit&gt; &lt;option&gt; &lt;arg&gt;
  1791. </span><span style='color:#AAA'> Set the exit data. Useful with a closed door where you can
  1792. set the exit command: '#map exit e command {open east;e}'.
  1793. Use #map exit &lt;exit&gt; for a list of available options.
  1794. Use #map exit &lt;eixt&gt; save to save the exit data.
  1795. </span><span style='color:#FFF'>#map exitflag &lt;exit&gt; &lt;AVOID|BLOCK|HIDE|INVIS&gt; [on|off]
  1796. </span><span style='color:#AAA'> Set exit flags. See #map roomflag for more info.
  1797. </span><span style='color:#FFF'>#map explore &lt;exit&gt;
  1798. </span><span style='color:#AAA'> Explores the given exit until a dead end or an
  1799. intersection is found. The route is stored in #path and can
  1800. subsequently be used with #walk. Useful for long roads.
  1801. </span><span style='color:#FFF'>#map find &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt; &lt;flag&gt;
  1802. </span><span style='color:#AAA'> searches for the given room name. If found the shortest path
  1803. from your current location to the destination is calculated.
  1804. The route is stored in #path and can subsequently be used with
  1805. the various #path commands. If &lt;exits&gt; is provided all exits
  1806. must be matched, if &lt;roomdesc&gt;, &lt;roomarea&gt; or &lt;roomnote&gt; or
  1807. &lt;roomterrain&gt; or &lt;roomflag&gt; is provided these are matched as
  1808. well against the room to be found.
  1809. These options are also available to the at, delete, goto
  1810. link, list and run commands.
  1811. </span><span style='color:#FFF'>#map flag asciigraphics
  1812. </span><span style='color:#AAA'> Takes up more space but draws a more detailed
  1813. map that displays the ne se sw nw exits and room symbols.
  1814. </span><span style='color:#FFF'>#map flag asciivnums
  1815. </span><span style='color:#AAA'> Display room vnums if asciigraphics is enabled.
  1816. </span><span style='color:#FFF'>#map flag nofollow
  1817. </span><span style='color:#AAA'> When you enter movement commands the map will no longer
  1818. automatically follow along. Useful for MSDP and GMCP
  1819. automapping scripts.
  1820. </span><span style='color:#FFF'>#map flag static
  1821. </span><span style='color:#AAA'> Will make the map static so new rooms are no longer
  1822. created when walking into an unmapped direction. Useful when
  1823. you're done mapping and regularly bump into walls accidentally
  1824. creating a new room. #map dig etc will still work.
  1825. </span><span style='color:#FFF'>#map flag vtgraphics
  1826. </span><span style='color:#AAA'> Enables vt line drawing on some terminals
  1827. </span><span style='color:#FFF'>#map flag vtmap
  1828. </span><span style='color:#AAA'> Will enable the vtmap which is shown in the top split
  1829. screen if you have one. You can create a 16 rows high top
  1830. screen by using '#split 16 1'.
  1831. </span><span style='color:#FFF'>#map get &lt;option&gt; &lt;variable&gt; [vnum]
  1832. </span><span style='color:#AAA'> Store a map value into a variable, if no vnum is given the
  1833. current room is used. Use 'all' as the option to store all
  1834. values as a table.
  1835. </span><span style='color:#FFF'>#map get roomexits &lt;variable&gt;
  1836. </span><span style='color:#AAA'> Store all room exits into variable.
  1837. </span><span style='color:#FFF'>#map global &lt;room vnum&gt;
  1838. </span><span style='color:#AAA'> Set the vnum of a room that contains global
  1839. exits, for example an exit named 'recall' that leads to the
  1840. recall location. The room can contain multiple exits, in case
  1841. there are multiple commands that are similar to recall.
  1842. </span><span style='color:#FFF'>#map goto &lt;room vnum&gt; [dig]
  1843. </span><span style='color:#AAA'> Takes you to the given room vnum, with the
  1844. dig argument a new room will be created if none exists.
  1845. </span><span style='color:#FFF'>#map goto &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt;
  1846. </span><span style='color:#AAA'> Takes you to the given room name, if you provide exits those
  1847. must match.
  1848. </span><span style='color:#FFF'>#map info
  1849. </span><span style='color:#AAA'> Gives information about the map and room you are in.
  1850. </span><span style='color:#FFF'>#map insert &lt;direction&gt; [roomflag]
  1851. </span><span style='color:#AAA'> Insert a room in the given direction. Most useful for inserting
  1852. void rooms.
  1853. </span><span style='color:#FFF'>#map jump &lt;x&gt; &lt;y&gt; &lt;z&gt;
  1854. </span><span style='color:#AAA'> Jump to the given coordinate, which is relative
  1855. to your current room.
  1856. </span><span style='color:#FFF'>#map landmark &lt;name&gt; &lt;vnum&gt; [description] [size]
  1857. </span><span style='color:#AAA'> Creates an alias to target the provided room vnum. The
  1858. description is optional and should be brief. The size
  1859. determines from how many rooms away the landmark can be
  1860. seen.
  1861. </span><span style='color:#FFF'>#map leave
  1862. </span><span style='color:#AAA'> Makes you leave the map. Useful when entering a maze. You
  1863. can return to your last known room using #map return.
  1864. </span><span style='color:#FFF'>#map legend &lt;legend&gt; [symbols|reset]
  1865. #map legend &lt;legend&gt; &lt;index&gt; [symbol]
  1866. </span><span style='color:#AAA'> There are several legends and sub-legends available for
  1867. drawing maps to suit personal preference and character sets.
  1868. Use #map legend all to see the legend as currently defined.
  1869. Use #map legend &lt;legend&gt; &lt;reset&gt; to set the default legend.
  1870. Use #map legend &lt;legend&gt; &lt;character list&gt; to create a custom
  1871. legend. Custom legends are automatically saved and loaded by
  1872. using #map read and #map write.
  1873. </span><span style='color:#FFF'>#map link &lt;direction&gt; &lt;room name&gt; [both]
  1874. </span><span style='color:#AAA'> Links two rooms. If the both
  1875. argument and a valid direction is given the link is two ways.
  1876. </span><span style='color:#FFF'>#map list &lt;name&gt; &lt;exits&gt; &lt;desc&gt; &lt;area&gt; &lt;note&gt; &lt;terrain&gt;
  1877. </span><span style='color:#AAA'> Lists all matching rooms and their distance. The following
  1878. search keywords are supported.
  1879. {distance} &lt;arg&gt; will list rooms within given distance.
  1880. {roomarea} &lt;arg&gt; will list rooms with matching area name.
  1881. {roomdesc} &lt;arg&gt; will list rooms with matching room desc.
  1882. {roomexits} &lt;arg&gt; will list rooms with identical room exits.
  1883. Use * as an exit to ignore non pathdir exits.
  1884. {roomflag} &lt;arg&gt; will list rooms with matching room flags.
  1885. {roomid} &lt;arg&gt; will list rooms with identical id name.
  1886. {roomname} &lt;arg&gt; will list rooms with matching room name.
  1887. {roomnote} &lt;arg&gt; will list rooms with matching room note.
  1888. {roomterrain} &lt;arg&gt; will list rooms with matching room terrain.
  1889. {variable} &lt;arg&gt; will save the output to given variable.
  1890. </span><span style='color:#FFF'>#map map &lt;rows&gt; &lt;cols&gt; &lt;append|overwrite|list|variable&gt; &lt;name&gt;
  1891. </span><span style='color:#AAA'> Display a drawing of the map of the given height and width.
  1892. All arguments are optional. If {rows} or {cols} are set to {}
  1893. or {0} they will use the scrolling window size as the default.
  1894. If {rows} or {cols} are a negative number this number is
  1895. subtracted from the scrolling window size.
  1896. </span><span style='color:#FFF'>#map map &lt;rows&gt; &lt;cols&gt; draw &lt;square&gt;
  1897. </span><span style='color:#AAA'> Display a drawing of the map of the given height and width.
  1898. The square argument exists of 4 numbers formulating the top
  1899. left corner and bottom right corner of a square.
  1900. If you use {append|overwrite} the map is written to the specified
  1901. file name which must be given as the 4th argument.
  1902. If you use {list|variable} the map is saved to the specified
  1903. variable name.
  1904. </span><span style='color:#FFF'>#map move &lt;direction&gt;
  1905. </span><span style='color:#AAA'> This does the same as an actual movement command, updating your
  1906. location on the map and creating new rooms. Useful when you are
  1907. following someone and want the map to follow along. You will need
  1908. to create actions using '#map move', for this to work.
  1909. </span><span style='color:#FFF'>#map offset &lt;row&gt; &lt;col&gt; &lt;row&gt; &lt;col&gt;
  1910. </span><span style='color:#AAA'> Define the offset of the vtmap as a square. Without an argument
  1911. it defaults to the entire top split region.
  1912. </span><span style='color:#FFF'>#map read &lt;filename&gt;
  1913. </span><span style='color:#AAA'> Will load the given map file.
  1914. </span><span style='color:#FFF'>#map resize &lt;size&gt;
  1915. </span><span style='color:#AAA'> Resize the map, setting the maximum number of rooms.
  1916. </span><span style='color:#FFF'>#map return
  1917. </span><span style='color:#AAA'> Returns you to your last known room after leaving the map
  1918. or loading a map.
  1919. </span><span style='color:#FFF'>#map roomflag &lt;flags&gt; &lt;get|on|off&gt;
  1920. </span><span style='color:#AAA'>
  1921. </span><span style='color:#FFF'>#map roomflag avoid
  1922. </span><span style='color:#AAA'> When set, '#map find' will avoid a route leading
  1923. through that room. Useful for locked doors, etc.
  1924. </span><span style='color:#FFF'>#map roomflag block
  1925. </span><span style='color:#AAA'> When set the automapper will prevent movement into or through
  1926. the room. Useful for death traps.
  1927. </span><span style='color:#FFF'>#map roomflag hide
  1928. </span><span style='color:#AAA'> When set, '#map' will not display the map beyond
  1929. this room. When mapping overlapping areas or areas that aren't
  1930. build consistently you need this flag as well to stop
  1931. auto-linking, unless you use void rooms.
  1932. </span><span style='color:#FFF'>#map roomflag invis
  1933. </span><span style='color:#AAA'> When set the room will be colored with the INVIS color.
  1934. </span><span style='color:#FFF'>#map roomflag leave
  1935. </span><span style='color:#AAA'> When entering a room with this flag, you will
  1936. automatically leave the map. Useful when set at the entrance
  1937. of an unmappable maze.
  1938. </span><span style='color:#FFF'>#map roomflag noglobal
  1939. </span><span style='color:#AAA'> This marks a room as not allowing global
  1940. transportation, like norecall rooms that block recall.
  1941. </span><span style='color:#FFF'>#map roomflag void
  1942. </span><span style='color:#AAA'> When set the room becomes a spacing room that can
  1943. be used to connect otherwise overlapping areas. A void room
  1944. should only have two exits. When entering a void room you are
  1945. moved to the connecting room until you enter a non void room.
  1946. </span><span style='color:#FFF'>#map roomflag static
  1947. </span><span style='color:#AAA'> When set the room will no longer be autolinked
  1948. when walking around. Useful for mapping mazes.
  1949. </span><span style='color:#FFF'>#map run &lt;room name&gt; [delay]
  1950. </span><span style='color:#AAA'> Calculates the shortest path to the destination and walks you
  1951. there. The delay is optional and requires using braces. Besides
  1952. the room name a list of exits can be provided for more precise
  1953. matching.
  1954. </span><span style='color:#FFF'>#map set &lt;option&gt; &lt;value&gt; [vnum]
  1955. </span><span style='color:#AAA'> Set a map value for your current room, or given room if a room
  1956. vnum is provided.
  1957. </span><span style='color:#FFF'>#map sync &lt;filename&gt;
  1958. </span><span style='color:#AAA'> Similar to #map read except the current map won't be unloaded
  1959. or overwritten.
  1960. </span><span style='color:#FFF'>#map terrain &lt;name&gt; &lt;symbol&gt; [flag]
  1961. </span><span style='color:#AAA'> Set the terrain symbol and flag.
  1962. </span><span style='color:#FFF'>#map terrain &lt;name&gt; &lt;symbol&gt; [DENSE|SPARSE|SCANT]
  1963. </span><span style='color:#AAA'> Determine symbol density, omit for the default.
  1964. </span><span style='color:#FFF'>#map terrain &lt;name&gt; &lt;symbol&gt; [NARROW|WIDE|VAST]
  1965. </span><span style='color:#AAA'> Determine symbol spread range, omit for the default.
  1966. </span><span style='color:#FFF'>#map terrain &lt;name&gt; &lt;symbol&gt; [FADEIN|FADEOUT]
  1967. </span><span style='color:#AAA'> Determine symbol spread density, omit for the default.
  1968. </span><span style='color:#FFF'>#map terrain &lt;name&gt; &lt;symbol&gt; [DOUBLE]
  1969. </span><span style='color:#AAA'> You're using two characters for the symbol.
  1970. </span><span style='color:#FFF'>#map travel &lt;direction&gt; &lt;delay&gt;
  1971. </span><span style='color:#AAA'> Follows the direction until a dead end or an intersection is
  1972. found. Use braces around the direction if you use the delay,
  1973. which will add the given delay between movements.
  1974. Use #path stop to stop a delayed run.
  1975. </span><span style='color:#FFF'>#map undo
  1976. </span><span style='color:#AAA'> Will undo your last move. If this created a room or a link
  1977. they will be deleted, otherwise you'll simply move back a
  1978. room. Useful if you walked into a non existant direction.
  1979. </span><span style='color:#FFF'>#map uninsert &lt;direction&gt;
  1980. </span><span style='color:#AAA'> Exact opposite of the insert command.
  1981. </span><span style='color:#FFF'>#map unlandmark &lt;name&gt;
  1982. </span><span style='color:#AAA'> Removes a landmark.
  1983. </span><span style='color:#FFF'>#map unlink &lt;direction&gt; [both]
  1984. </span><span style='color:#AAA'> Will remove the exit, this isn't two way so you can have the
  1985. properly display no exit rooms and mazes.
  1986. If you use the both argument the exit is removed two-ways.
  1987. </span><span style='color:#FFF'>#map unterrain &lt;name&gt;
  1988. </span><span style='color:#AAA'> Removes a terrain.
  1989. </span><span style='color:#FFF'>#map update [now]
  1990. </span><span style='color:#AAA'> Sets the vtmap to update within the next 0.1 seconds, or
  1991. instantly with the now argument.
  1992. </span><span style='color:#FFF'>#map vnum &lt;low&gt; [high]
  1993. </span><span style='color:#AAA'> Change the room vnum to the given number, if a range is
  1994. provided the first available room in that range is selected.
  1995. </span><span style='color:#FFF'>#map write &lt;filename&gt; [force]
  1996. </span><span style='color:#AAA'> Will save the map, if you want to save a map to a .tin file
  1997. you must provide the {force} argument.
  1998. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#PATH'>path</a>, <a href='#PATHDIR'>pathdir</a> and <a href='#SPEEDWALK'>speedwalk</a>.
  1999. <a name='MAPPING'></a>
  2000. </span><span style='color:#5F5'> MAPPING
  2001. </span><span style='color:#AAA'>
  2002. TinTin++ has a powerful automapper that uses a room system similar to
  2003. Diku MUDs which means that odd map layouts and weird exit
  2004. configurations aren't a problem. The mapper provides tools to improve
  2005. the visual map display. For basic path tracking see #help PATH.
  2006. </span><span style='color:#FFF'> #map create [size]
  2007. </span><span style='color:#AAA'>
  2008. This command creates the initial map. The size is 50,000 by default
  2009. and can be changed at any time with the #map resize command. If you
  2010. play a MUD that uses MSDP or GMCP to provide room numbers you'll have
  2011. to increase it to the highest reported room number. Increasing the
  2012. size of the map doesn't decrease performance.
  2013. </span><span style='color:#FFF'> #map goto &lt;location&gt;
  2014. </span><span style='color:#AAA'>
  2015. When you create the map you are not automatically inside the map. By
  2016. default room number (vnum) 1 is created, so you can go to it using
  2017. #map goto 1. Once you are inside the map new rooms are automatically
  2018. created as you move around. Movement commands are defined with the
  2019. pathdir command. By default n, ne, e, se, s, sw, w, nw, u, d are
  2020. defined.
  2021. </span><span style='color:#FFF'>
  2022. #map map &lt;rows&gt; &lt;cols&gt; &lt;append|overwrite|list|variable&gt; &lt;name&gt;
  2023. </span><span style='color:#AAA'>
  2024. To see the map you can use #map map. It's annoying to have to
  2025. constantly type #map map however. Instead it's possible to use #split
  2026. to display a vt100 map. To do so execute:
  2027. </span><span style='color:#FFF'>#split 16 1
  2028. #map flag vtmap on</span><span style='color:#AAA'>
  2029. The first command sets the top split lines to 16 and the bottom split
  2030. line to 1. If you want a smaller or larger map display you can use a
  2031. different value than 16.
  2032. If you don't need to display diagonal exits and prefer a more compact
  2033. look you can use #map flag AsciiGraphics off. This will enable the
  2034. standard display which uses UTF-8 box drawing characters, results may
  2035. vary depending on the font used.
  2036. If your terminal supports UTF-8 you can also give #Map flag unicode on
  2037. a try.
  2038. If you want to display the map in a different location of the screen
  2039. use something like:
  2040. </span><span style='color:#FFF'>#split 0 1 0 -80
  2041. #map offset 1 81 -4 -1</span><span style='color:#AAA'>
  2042. This will display the map on the right side of the screen, if the
  2043. width of the screen is wide enough.
  2044. </span><span style='color:#FFF'>
  2045. #map undo
  2046. </span><span style='color:#AAA'>
  2047. If you accidentally walk into the wall on your MUD the mapper will
  2048. still create a new room. You can easily fix this mistake by using
  2049. #map undo. If you want to move around on the map without moving around
  2050. on the MUD you can use: #map move {direction}. To delete a room
  2051. manually you can use: #map delete {direction}. To create a room
  2052. manually you can use: #map dig {direction}.
  2053. </span><span style='color:#FFF'>
  2054. #map write &lt;filename&gt;
  2055. </span><span style='color:#AAA'>
  2056. You can save your map using #map write, to load a map you can use
  2057. #map read &lt;filename&gt;.
  2058. </span><span style='color:#FFF'>
  2059. #map set &lt;option&gt; &lt;value&gt;
  2060. </span><span style='color:#AAA'>
  2061. You can set the room name using #map set roomname &lt;name&gt;. You either
  2062. have to do this manually or create triggers to set the room name
  2063. automatically. Once the room name is set you can use #map goto with
  2064. the room name to visit it. If there are two rooms with the same name
  2065. #map goto will go to the most nearby room. If you want to always go
  2066. to the same room you should memorize the room number. You can further
  2067. narrow down the matches by providing additional arguments, for example:
  2068. </span><span style='color:#FFF'>
  2069. #map goto {dark alley} {roomexits} {n;e} {roomarea} {Haddock Ville}
  2070. </span><span style='color:#AAA'>
  2071. You can set the room weight using #map set roomweight {value}. The
  2072. weight by default is set to 1.0 and it represents the difficulty of
  2073. traversing the room. If you have a lake as an alternative route, and
  2074. traversing water rooms is 4 times slower than regular rooms, then you
  2075. could set the weight of the lake rooms to 4.0. If the lake is 3 rooms
  2076. wide the total weight is 12. If walking around the lake has a weight
  2077. less than 12 the mapper will go around the lake, if the weight is
  2078. greater than 12 the mapper will take a route through the lake.
  2079. You can set the room symbol using #map set roomsymbol {value}. The
  2080. symbol should be one, two, or three characters, which can be
  2081. colorized. You can for example mark shops with an 'S' and colorize the
  2082. 'S' depending on what type of shop it is.
  2083. </span><span style='color:#FFF'>
  2084. #map run &lt;location&gt; &lt;delay&gt;
  2085. </span><span style='color:#AAA'>
  2086. The run command will have tintin find the shortest path to the given
  2087. location and execute the movement commands to get there. You can
  2088. provide a delay in seconds with floating point precision, for example:
  2089. </span><span style='color:#FFF'>#map run {dark alley} {0.5}</span><span style='color:#AAA'>
  2090. </span><span style='color:#FFF'>
  2091. #map insert {direction} {flag}
  2092. </span><span style='color:#AAA'>
  2093. The insert command is useful for adding spacer rooms called void rooms.
  2094. Often rooms overlap, and by adding void rooms you can stretch out
  2095. exits. For example: #map insert north void. You cannot enter void rooms
  2096. once they've been created, so you'll have to use #map info in an
  2097. adjacent room to find the room vnum, then use #map goto {vnum} to
  2098. visit.
  2099. It's also possible to align rooms using void rooms. This is easily
  2100. done using #map insert north void.
  2101. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a>, <a href='#PATH'>path</a> and <a href='#PATHDIR'>pathdir</a>.
  2102. <a name='MATH'></a>
  2103. </span><span style='color:#5F5'> MATH
  2104. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #math </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>expression</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2105. Performs math operations and stores the result in a variable. The math
  2106. follows a C-like precedence, as follows, with the top of the list
  2107. having the highest priority.
  2108. Operators Priority Function
  2109. ------------------------------------------------
  2110. ! 0 logical not
  2111. ~ 0 bitwise not
  2112. d 1 integer random dice
  2113. * 2 integer multiply
  2114. ** 2 integer power
  2115. / 2 integer divide
  2116. // 2 integer sqrt // 2 or cbrt // 3
  2117. % 2 integer modulo
  2118. + 3 integer addition
  2119. - 3 integer subtraction
  2120. &lt;&lt; 4 bitwise shift
  2121. &gt;&gt; 4 bitwise shift
  2122. .. 4 bitwise ellipsis
  2123. &gt; 5 logical greater than
  2124. &gt;= 5 logical greater than or equal
  2125. &lt; 5 logical less than
  2126. &lt;= 5 logical less than or equal
  2127. == 6 logical equal (can use regex)
  2128. === 6 logical equal (never regex)
  2129. != 6 logical not equal (can use regex)
  2130. !== 6 logical not equal (never regex)
  2131. &amp; 7 bitwise and
  2132. ^ 8 bitwise xor
  2133. | 9 bitwise or
  2134. &amp;&amp; 10 logical and
  2135. ^^ 11 logical xor
  2136. || 12 logical or
  2137. ? 13 logical ternary if (unfinished code)
  2138. : 14 logical ternary else
  2139. True is any non-zero number, and False is zero. Parentheses () have
  2140. highest precedence, so inside the () is always evaluated first.
  2141. Strings must be enclosed in { } and use regex with == and !=,
  2142. in the case of &lt;= and &gt;= the alphabetic order is compared.
  2143. The #if and #switch commands use #math. Several commands accepting
  2144. integer input allow math operations as well.
  2145. Floating point precision is added by using the decimal . operator.
  2146. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #math {heals} {&dollar;mana / 40}
  2147. Assuming there is a variable &dollar;mana, divides its value by 40 and stores
  2148. the result in &dollar;heals.
  2149. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action {^You receive %0 experience} {updatexp %0}
  2150. #alias updatexp {#math {xpneed} {&dollar;xpneed - %0}
  2151. Let's say you have a variable which stores xp needed for your next
  2152. level. The above will modify that variable after every kill, showing
  2153. the amount still needed.
  2154. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #action {%0 tells %1}
  2155. {#if {{%0} == {Bubba} &amp;&amp; &dollar;afk} {reply I'm away, my friend.}}
  2156. When you are away from keyboard, it will only reply to your friend.
  2157. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CAT'>cat</a>, <a href='#FORMAT'>format</a>, <a href='#FUNCTION'>function</a>, <a href='#LOCAL'>local</a>, <a href='#MATHEMATICS'>mathematics</a>, <a href='#REPLACE'>replace</a>, <a href='#SCRIPT'>script</a> and <a href='#VARIABLE'>variable</a>.
  2158. <a name='MATHEMATICS'></a>
  2159. </span><span style='color:#5F5'> MATHEMATICS
  2160. </span><span style='color:#FFF'>Number operations
  2161. </span><span style='color:#AAA'> Operators Priority Function
  2162. ------------------------------------------------
  2163. ! 0 logical not
  2164. ~ 0 bitwise not
  2165. * 1 integer multiply
  2166. ** 1 integer power
  2167. / 1 integer divide
  2168. // 1 integer sqrt // 2 or cbrt // 3
  2169. % 1 integer modulo
  2170. d 1 integer random dice roll
  2171. + 2 integer addition
  2172. - 2 integer subtraction
  2173. &lt;&lt; 3 bitwise shift
  2174. &gt;&gt; 3 bitwise shift
  2175. &gt; 4 logical greater than
  2176. &gt;= 4 logical greater than or equal
  2177. &lt; 4 logical less than
  2178. &lt;= 4 logical less than or equal
  2179. == 5 logical equal
  2180. != 5 logical not equal
  2181. &amp; 6 bitwise and
  2182. ^ 7 bitwise xor
  2183. | 8 bitwise or
  2184. &amp;&amp; 9 logical and
  2185. ^^ 10 logical xor
  2186. || 11 logical or
  2187. Operator priority can be ignored by using parentheses, for example (1 + 1) * 2
  2188. equals 4, while 1 + 1 * 2 equals 3.
  2189. </span><span style='color:#FFF'>String operations</span><span style='color:#AAA'>
  2190. Operators Priority Function
  2191. ------------------------------------------------
  2192. &gt; 4 alphabetical greater than
  2193. &gt;= 4 alphabetical greater than or equal
  2194. &lt; 4 alphabetical less than
  2195. &lt;= 4 alphabetical less than or equal
  2196. == 5 alphabetical equal using regex
  2197. != 5 alphabetical not equal using regex
  2198. === 5 alphabetical equal
  2199. !== 5 alphabetical not equal
  2200. Strings must be encased in double quotes or braces. The &gt; &gt;= &lt; &lt;= operators
  2201. perform basic string comparisons. The == != operators perform regular
  2202. expressions, with the argument on the left being the string, and the argument
  2203. on the right being the regex. For example {bla} == {%*a} would evaluate as 1.
  2204. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MATH'>math</a> and <a href='#REGEXP'>regexp</a>.
  2205. <a name='MESSAGE'></a>
  2206. </span><span style='color:#5F5'> MESSAGE
  2207. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #message </span><span style='color:#FFF'>{</span><span style='color:#AAA'>listname</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>on</span><span style='color:#FFF'>|</span><span style='color:#AAA'>off</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2208. This will show the message status of all your lists if typed without an
  2209. argument. If you set for example VARIABLES to OFF you will no longer be
  2210. spammed when correctly using the #VARIABLE and #UNVARIABLE commands.
  2211. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CLASS'>class</a>, <a href='#DEBUG'>debug</a>, <a href='#IGNORE'>ignore</a>, <a href='#INFO'>info</a> and <a href='#KILL'>kill</a>.
  2212. <a name='METRIC SYSTEM'></a>
  2213. </span><span style='color:#5F5'> METRIC SYSTEM
  2214. </span><span style='color:#AAA'>
  2215. Name Symbol Factor
  2216. --------------------------------------------------
  2217. Mega M 1 000 000
  2218. Kilo K 1 000
  2219. milli m 0.001
  2220. micro u 0.000 001
  2221. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#FORMAT'>format</a> and <a href='#MATH'>math</a>.
  2222. <a name='MOUSE'></a>
  2223. </span><span style='color:#5F5'> MOUSE
  2224. </span><span style='color:#AAA'>
  2225. To enable xterm mouse tracking use #CONFIG MOUSE ON.
  2226. To see mouse events as they happen use #CONFIG MOUSE INFO. This
  2227. information can then be used to create mouse events with the #event
  2228. command and buttons with the #button command.
  2229. Visual buttons and pop-ups can be drawn on the screen with the #draw
  2230. command.
  2231. The input field can be changed and renamed using #screen inputregion,
  2232. which allows creating named events for enter handling.
  2233. Links can be created using the MSLP protocol which will generate link
  2234. specific events when clicked.
  2235. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUTTON'>button</a>, <a href='#DRAW'>draw</a>, <a href='#EVENT'>event</a> and <a href='#MSLP'>MSLP</a>.
  2236. <a name='MSDP'></a>
  2237. </span><span style='color:#5F5'> MSDP
  2238. </span><span style='color:#AAA'>
  2239. MSDP (Mud Server Data Protocol) is part of the #port functionality.
  2240. See #help event for additional documentation as all MSDP events are
  2241. available as regular events.
  2242. Available MSDP events can be queried using the MSDP protocol
  2243. as described in the specification.
  2244. </span><span style='color:#FFF'>
  2245. https://tintin.sourceforge.io/protocols/msdp
  2246. Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#PORT'>port</a>.
  2247. <a name='MSLP'></a>
  2248. </span><span style='color:#5F5'> MSLP
  2249. </span><span style='color:#AAA'>
  2250. MSLP (Mud Server Link Protocol) requires enabling #config mouse on,
  2251. and creating the appropriate LINK events.
  2252. The simplest link can be created by surrounding a keyword with the
  2253. &bsol;e[4m and &bsol;e[24m tags.
  2254. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #substitute {&bsol;b{n|e|s|w|u|d}&bsol;b} {&bsol;e[4m%1&bsol;[24m}
  2255. This would display 'Exits: n, e, w.' as 'Exits: n, e, w.'.
  2256. When clicked this would trigger the PRESSED LINK MOUSE BUTTON ONE
  2257. event of which %4 will hold the link command and %6 holds the
  2258. link name, which in the case of a simple link will be empty.
  2259. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {PRESSED LINK MOUSE BUTTON ONE} {#send {%4}}
  2260. Keep in mind that if you change PRESSED to DOUBLE-CLICKED the link
  2261. will only work if the text does not scroll in between clicks.
  2262. If you want to create a complex link use an OSC code.
  2263. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {&bsol;bsmurf&bsol;b} {&bsol;e]68;1;;say I hate smurfs!&bsol;a&bsol;e[4m%0&bsol;e[24m}
  2264. If you have the LINK event of the previous example set, the %4
  2265. argument will contain 'say I hate smurfs!'.
  2266. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {&bsol;bgoblin&bsol;b} {&bsol;e]68;1;SEND;kill goblin&bsol;a&bsol;e[4m%0&bsol;e[24m}
  2267. Notice the previous instance of ;; has been replaced with ;SEND;
  2268. which will name the link. This will generate a named event.
  2269. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {PRESSED LINK SEND MOUSE BUTTON ONE} {#send {%4}}
  2270. By naming links you can organize things a little bit better instead
  2271. of tunneling everything through the same event.
  2272. Keep in mind that the server is allowed to use &bsol;e]68;1;&bsol;a as well,
  2273. subsequently various security measures are in place.
  2274. To create secure links, which are filtered out when send by a server,
  2275. you need to use &bsol;e]68;2;&bsol;a, and they instead trigger the SECURE LINK
  2276. event.
  2277. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {%* tells %*} {&bsol;e]68;2;EXEC;#cursor set tell %1 &bsol;a&bsol;e[4m%0&bsol;e[24m}
  2278. </span><span style='color:#FFF'> </span><span style='color:#AAA'> #event {PRESSED SECURE LINK EXEC MOUSE BUTTON ONE} {%4}
  2279. This would make you start a reply when clicking on a tell.
  2280. </span><span style='color:#FFF'>Website</span><span style='color:#AAA'>: https://tintin.mudhalla.net/protocols/mslp
  2281. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#EVENT'>event</a> and <a href='#PORT'>port</a>.
  2282. <a name='NOP'></a>
  2283. </span><span style='color:#5F5'> NOP
  2284. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #nop </span><span style='color:#FFF'>{</span><span style='color:#AAA'>whatever</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2285. Short for 'no operation', and is ignored by the client. It is useful
  2286. for commenting in your coms file, any text after the nop and before a
  2287. semicolon or end of line is ignored. You shouldn't put braces { } in it
  2288. though, unless you close them properly.
  2289. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: By using braces you can comment out multiple lines of code in a script
  2290. file.
  2291. For commenting out an entire trigger and especially large sections of
  2292. triggers you would want to use /* text */
  2293. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #nop This is the start of my script file.
  2294. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#READ'>read</a>
  2295. <a name='PARSE'></a>
  2296. </span><span style='color:#5F5'> PARSE
  2297. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #parse </span><span style='color:#FFF'>{</span><span style='color:#AAA'>string</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2298. Like the loop statement, parse will loop from start to finish through
  2299. the given string. The value of the current character is stored in the
  2300. provided variable.
  2301. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #parse {hello world} {char} {#show &dollar;char}
  2302. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#REPEAT'>repeat</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  2303. <a name='PATH'></a>
  2304. </span><span style='color:#5F5'> PATH
  2305. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #path </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2306. create Will clear the path and start path mapping.
  2307. delete Will delete the last move of the path.
  2308. describe Describe the path and current position.
  2309. destroy Will clear the path and stop path mapping.
  2310. get Will get either the length or position.
  2311. goto Go the the start, end, or given position index.
  2312. insert Add the given argument to the path.
  2313. load Load the given variable as the new path.
  2314. map Display the map and the current position.
  2315. move Move the position forward or backward. If a number is given
  2316. the position is changed by the given number of steps.
  2317. run Execute the current path, with an optional floating point
  2318. delay in seconds as the second argument.
  2319. save Save the path to a variable. You must specify whether you
  2320. want to save the path 'forward' or 'backward'.
  2321. swap Switch the forward and backward path.
  2322. unzip Load the given speedwalk as the new path.
  2323. walk Take one step forward or backward.
  2324. zip Turn the path into a speedwalk.
  2325. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #path ins {unlock n;open n} {unlock s;open s}
  2326. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a>, <a href='#PATHDIR'>pathdir</a> and <a href='#SPEEDWALK'>speedwalk</a>.
  2327. <a name='PATHDIR'></a>
  2328. </span><span style='color:#5F5'> PATHDIR
  2329. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #pathdir </span><span style='color:#FFF'>{</span><span style='color:#AAA'>dir</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>reversed dir</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>coord</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2330. By default tintin sets the most commonly used movement commands
  2331. meaning you generally don't really have to bother with pathdirs.
  2332. Pathdirs are used by the #path and #map commands.
  2333. The first argument is a direction, the second argument is the reversed
  2334. direction. The reverse direction of north is south, etc.
  2335. The third argument is a spatial coordinate which is a power of two.
  2336. 'n' is 1, 'e' is 2, 's' is 4, 'w' is '8', 'u' is 16, 'd' is 32. The
  2337. exception is for compound directions, whose value should be the sum
  2338. of the values of each cardinal direction it is composed of. For
  2339. example, 'nw' is the sum of 'n' and 'w' which is 1 + 8, so 'nw'
  2340. needs to be given the value of 9. This value is required for the
  2341. #map functionality to work properly.
  2342. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #pathdir {ue} {dw} {18}
  2343. #pathdir {dw} {ue} {40}
  2344. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a pathdir with the #unpathdir command.
  2345. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a> and <a href='#PATH'>path</a>.
  2346. <a name='PCRE'></a>
  2347. </span><span style='color:#5F5'> PCRE
  2348. </span><span style='color:#AAA'>
  2349. A regular expression, regex or regexp is a sequence of characters that
  2350. defines a search pattern. Since the 1980s, different syntaxes for
  2351. writing regular expressions exist, the two most widely used ones being
  2352. the POSIX syntax and the similar but more advanced Perl standard.
  2353. TinTin++ supports the Perl standard known as PCRE (Perl Compatible
  2354. Regular Expressions).
  2355. Regular expressions are an integral part of TinTin++, but keep in mind
  2356. that tintin doesn't allow you to use regular expressions directly,
  2357. instead it uses a simpler intermediate syntax that still allows more
  2358. complex expressions when needed.
  2359. Commands that utilize regular expressions are: action, alias, elseif,
  2360. gag, grep, highlight, if, kill, local, math, prompt, regexp, replace,
  2361. substitute, switch, variable and while. Several other commands use
  2362. regular expressions in minor ways. Fortunately the basics are very
  2363. easy to learn.
  2364. </span><span style='color:#FFF'> TinTin++ Regular Expression</span><span style='color:#AAA'>
  2365. The following support is available for regular expressions.
  2366. ^ match start of line.
  2367. &dollar; match of end of line.
  2368. &bsol; escape one character.
  2369. %1-%99 match of any text, stored in the corresponding index.
  2370. %0 should be avoided in the regex, contains all matched text.
  2371. { } embed a perl compatible regular expression, matches are stored.
  2372. %!{ } embed a perc compatible regular expression, matches are not stored.
  2373. [ ] . + | ( ) ? * are treated as normal text unless used within braces. Keep in
  2374. mind that { } is replaced with ( ) automatically unless %!{ } is used.
  2375. </span><span style='color:#FFF'>
  2376. TinTin++ Description POSIX</span><span style='color:#AAA'>
  2377. %d Match zero to any number of digits ([0-9]*?)
  2378. %D Match zero to any number of non-digits ([^0-9]*?)
  2379. %i Matches become case insensitive (?i)
  2380. %I Matches become case sensitive (default) (?-i)
  2381. %s Match zero to any number of spaces ([&bsol;r&bsol;n&bsol;t ]*?)
  2382. %w Match zero to any number of word characters ([A-Za-z0-9_]*?)
  2383. %W Match zero to any number of non-word characters ([^A-Za-z0-9_]*?)
  2384. %? Match zero or one character (.??)
  2385. %. Match one character (.)
  2386. %+ Match one to any number of characters (.+?)
  2387. %* Match zero to any number of characters (.*?)
  2388. </span><span style='color:#FFF'>
  2389. Variables</span><span style='color:#AAA'>
  2390. If you use %1 in an action to perform a match the matched string is
  2391. stored in the %1 variable which can be used in the action body.
  2392. Example: %1 says 'Tickle me'} {tickle %1}
  2393. If you use %2 the match is stored in %2, etc. If you use an unnumbered
  2394. match like %* or %S the match is stored at the last used index
  2395. incremented by one.
  2396. Example: %3 says '%*'} {#if {&quot;%4&quot; == &quot;Tickle me&quot;} {tickle %3}}
  2397. The maximum variable index is 99. If you begin an action with %* the
  2398. match is stored in %1. You should never use %0 in the trigger part of
  2399. an action, when used in the body of an action %0 contains all the parts
  2400. of the string that were matched.
  2401. To prevent a match from being stored use %!*, %!w, etc.
  2402. </span><span style='color:#FFF'>
  2403. Perl Compatible Regular Expressions</span><span style='color:#AAA'>
  2404. You can embed a PCRE (Perl Compatible Regular Expression) using curley
  2405. braces { }, these braces are replaced with parentheses ( ) unless you
  2406. use %!{ }.
  2407. </span><span style='color:#FFF'>
  2408. Or</span><span style='color:#AAA'>
  2409. You can separate alternatives within a PCRE using the | character.
  2410. Example: #act {%* raises {his|her|its} eyebrows.} {say 42..}
  2411. </span><span style='color:#FFF'>
  2412. Brackets</span><span style='color:#AAA'>
  2413. You can group alternatives and ranges within a PCRE using brackets.
  2414. Example: #act {%* says 'Who is number {[1-9]}} {say &dollar;number[%2] is number %2}
  2415. The example only triggers if someone provides a number between 1 and
  2416. 9. Any other character will cause the action to not trigger.
  2417. Example: #act {%* says 'Set password to {[^0-9]*}&dollar;} {say The password must
  2418. contain at least one number, not for security reasons, but just to
  2419. annoy you.} {4}
  2420. When the ^ character is used within brackets it creates an inverse
  2421. search, [^0-9] matches every character except for a number between 0
  2422. and 9.
  2423. </span><span style='color:#FFF'>
  2424. Quantification</span><span style='color:#AAA'>
  2425. A quantifier placed after a match specifies how often the match is
  2426. allowed to occur.
  2427. ? repeat zero or one time.
  2428. * repeat zero or multiple times.
  2429. + repeat once or multiple times.
  2430. {n} repeat exactly n times, n must be a number.
  2431. {n,} repeat at least n times, n must be a number.
  2432. {n,o} repeat between n and o times, n and o must be a number.
  2433. Example: #act {%* says 'Who is number {[1-9][0-9]{0,2}} {Say &dollar;number[%2] is
  2434. number %2}
  2435. The example only triggers if someone provides a number between 1 and
  2436. 999.
  2437. </span><span style='color:#FFF'>Parantheses</span><span style='color:#AAA'>
  2438. TinTin Regular Expressions automatically add parenthesis, for example
  2439. %* translates to (.*?) in PCRE unless the %* is found at the start or
  2440. end of the line, in which cases it translates to (.*). Paranthesis in
  2441. PCRE causes a change in execution priority similar to mathematical
  2442. expressions, but parentheses also causes the match to be stored to a
  2443. variable.
  2444. When nesting multiple sets of parentheses each nest is assigned its
  2445. numerical variable in order of appearance.
  2446. Example: #act {%* chats '{Mu(ha)+}'} {chat %2ha!}
  2447. If someone chats Muha you will chat Muhaha! If someone chats Muhaha
  2448. you will chat Muhahaha!
  2449. </span><span style='color:#FFF'>Lazy vs Greedy</span><span style='color:#AAA'>
  2450. By default regex matches are greedy, meaning {.*} will capture as much
  2451. text as possible.
  2452. Example: #regex {bli bla blo} {^{.*} {.*}&dollar;} {#show Arg1=(&amp;1) Arg2=(&amp;2)}
  2453. This will display: Arg1=(bli bla) Arg2=(blo)
  2454. By appending a ? behind a regex it becomes lazy, meaning {.*?} will
  2455. capture as little text as possible.
  2456. Example: #regex {bli bla blo} {^{.*?} {.*?}&dollar;} {#show Arg1=(&amp;1) Arg2=(&amp;2)}
  2457. This will display: Arg1=(bli) Arg2=(bla blo).
  2458. </span><span style='color:#FFF'>Escape Codes</span><span style='color:#AAA'>
  2459. PCRE support the following escape codes.
  2460. </span><span style='color:#FFF'>
  2461. PCRE Description POSIX</span><span style='color:#AAA'>
  2462. &bsol;A Match start of string ^
  2463. &bsol;b Match word boundaries (^|&bsol;r|&bsol;n|&bsol;t| |&dollar;)
  2464. &bsol;B Match non-word boundaries [^&bsol;r&bsol;n&bsol;t ]
  2465. &bsol;c Insert control character &bsol;c
  2466. &bsol;d Match digits [0-9]
  2467. &bsol;D Match non-digits [^0-9]
  2468. &bsol;e Insert escape character &bsol;e
  2469. &bsol;f Insert form feed character &bsol;f
  2470. &bsol;n Insert line feed character &bsol;n
  2471. &bsol;r Insert carriage return character &bsol;r
  2472. &bsol;s Match spaces [&bsol;r&bsol;n&bsol;t ]
  2473. &bsol;S Match non-spaces [^&bsol;r&bsol;n&bsol;t ]
  2474. &bsol;t Insert tab character &bsol;t
  2475. &bsol;w Match letters, numbers, and underscores [A-Za-z0-9_]
  2476. &bsol;W Match non-letters, numbers, and underscores [^A-Za-z0-9_]
  2477. &bsol;x Insert hex character &bsol;x
  2478. &bsol;Z Match end of string &dollar;
  2479. &bsol;s matches one space, &bsol;s+ matches one or multiple spaces.
  2480. </span><span style='color:#FFF'>Color triggers</span><span style='color:#AAA'>
  2481. To make matching easier text triggers (Actions, Gags, Highlights,
  2482. Prompts, and Substitutes) have their color codes stripped. If you
  2483. want to create a color trigger you must start the triggers with a ~
  2484. (tilde). To make escape codes visible use #config {convert meta} on.
  2485. Example: #action {~&bsol;e[1;37m%1} {#var roomname %1}
  2486. If the room name is the only line on the server in bright white
  2487. white color trigger will save the roomname.
  2488. This covers the basics. PCRE has more options, most of which are
  2489. somewhat obscure, so you'll have to read a PCRE manual for additional
  2490. information.
  2491. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#MAP'>map</a> and <a href='#PATH'>path</a>.
  2492. <a name='PORT'></a>
  2493. </span><span style='color:#5F5'> PORT
  2494. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #port </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2495. </span><span style='color:#FFF'>#port {init} {name} {port} {file}
  2496. </span><span style='color:#AAA'> Initilize a port session.
  2497. </span><span style='color:#FFF'>#port {call} {address} {port}
  2498. </span><span style='color:#AAA'> Connect to a remote socket.
  2499. </span><span style='color:#FFF'>#port {color} {color names}
  2500. </span><span style='color:#AAA'> Set the default color of port messages.
  2501. </span><span style='color:#FFF'>#port {dnd}
  2502. </span><span style='color:#AAA'> Do Not Disturb. Decline new connections
  2503. </span><span style='color:#FFF'>#port {group} {name} {group}
  2504. </span><span style='color:#AAA'> Assign a socket group.
  2505. </span><span style='color:#FFF'>#port {ignore} {name}
  2506. </span><span style='color:#AAA'> Ignore a socket
  2507. </span><span style='color:#FFF'>#port {info}
  2508. </span><span style='color:#AAA'> Display information about the port session.
  2509. </span><span style='color:#FFF'>#port {name} {name}
  2510. </span><span style='color:#AAA'> Change socket name.
  2511. </span><span style='color:#FFF'>#port {prefix} {text}
  2512. </span><span style='color:#AAA'> Set prefix before each message.
  2513. </span><span style='color:#FFF'>#port {send} {name|all} {text}
  2514. </span><span style='color:#AAA'> Send data to socket
  2515. </span><span style='color:#FFF'>#port {uninitialize}
  2516. </span><span style='color:#AAA'> Uninitialize the port session.
  2517. </span><span style='color:#FFF'>#port {who}
  2518. </span><span style='color:#AAA'> Show all connections
  2519. </span><span style='color:#FFF'>#port {zap} {name}
  2520. </span><span style='color:#AAA'> Close a connection
  2521. The port command is very similar to chat except that it creates a
  2522. new session dedicated to receiving socket connections at the given
  2523. port number without built-in support for a communication protocol.
  2524. You can init with 0 as the port number to create a dummy session.
  2525. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#CHAT'>chat</a>, <a href='#RUN'>run</a>, <a href='#SESSION'>session</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SNOOP'>snoop</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  2526. <a name='PROMPT'></a>
  2527. </span><span style='color:#5F5'> PROMPT
  2528. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #prompt </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>new text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>row #</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>col #</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2529. Prompt is a feature for split window mode, which will capture a line
  2530. received from the server and display it on the status bar of your
  2531. split screen terminal. You would define &lt;text&gt; and &lt;new text&gt; the
  2532. same way as you would with #substitute.
  2533. The row number is optional and useful if you use a non standard split
  2534. mode. A positive row number draws #row lines from the top while a
  2535. negative number draws #row lines from the bottom. Without an argument
  2536. #prompt will write to the default split line, which is one row above
  2537. the input line, typically at row -2.
  2538. The col number is optional and can be used to set the column index.
  2539. A positive col number draws the given number of columns from the left,
  2540. while a negative col number draws from the right. If you leave the
  2541. col number empty tintin will clear the row before printing at the
  2542. start of the row.
  2543. The #show command takes a row and col argument as well so it's also
  2544. possible to place text on your split lines using #show.
  2545. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See </span><span style='color:#FFF'>#help split</span><span style='color:#AAA'> for more information on split mode.
  2546. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See </span><span style='color:#FFF'>#help substitute</span><span style='color:#AAA'> for more information on text
  2547. substitutions.
  2548. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a prompt with the #unprompt command.
  2549. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ACTION'>action</a>, <a href='#GAG'>gag</a>, <a href='#HIGHLIGHT'>highlight</a> and <a href='#SUBSTITUTE'>substitute</a>.
  2550. <a name='READ'></a>
  2551. </span><span style='color:#5F5'> READ
  2552. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #read </span><span style='color:#FFF'>{</span><span style='color:#AAA'>filename</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2553. Reads a commands file into memory. The coms file is merged in with
  2554. the currently loaded commands. Duplicate commands are overwritten.
  2555. If you uses braces, { and } you can use several lines for 1 commands.
  2556. This however means you must always match every { with a } for the read
  2557. command to work.
  2558. You can comment out triggers using /* text */
  2559. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#LOG'>log</a>, <a href='#SCAN'>scan</a>, <a href='#TEXTIN'>textin</a> and <a href='#WRITE'>write</a>.
  2560. <a name='REGEXP'></a>
  2561. </span><span style='color:#5F5'> REGEXP
  2562. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #regexp </span><span style='color:#FFF'>{</span><span style='color:#AAA'>string</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>expression</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>true</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>false</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2563. Compares the string to the given regular expression.
  2564. The expression can contain escapes, and if you want to match a literal
  2565. &bsol; character you'll have to use &bsol;&bsol; to match a single backslash.
  2566. Variables are stored in &amp;1 to &amp;99 with &amp;0 holding the matched
  2567. substring.
  2568. ^ force match of start of line.
  2569. &dollar; force match of end of line.
  2570. &bsol; escape one character.
  2571. %1-%99 lazy match of any text, available at %1-%99.
  2572. %0 should be avoided in triggers, and if left alone lists all matches.
  2573. { } embed a raw regular expression, matches are stored to %1-%99.
  2574. %!{ } embed a raw regular expression, matches are not stored.
  2575. [ ] . + | ( ) ? * are treated as normal text unlessed used within
  2576. braces. Keep in mind that { } is replaced with ( ) automatically
  2577. unless %!{ } is used.
  2578. Of the following the (lazy) match is available at %1-%99 + 1
  2579. %d match zero to any number of digits.
  2580. %D match zero to any number of non digits.
  2581. %s match zero to any number of spaces.
  2582. %S match zero to any number of non spaces.
  2583. %w match zero to any number of word characters.
  2584. %W match zero to any number of non word characters.
  2585. Experimental (subject to change) matches are:
  2586. %a match zero to any number of characters including newlines.
  2587. %A match zero to any number of newlines.
  2588. %p match zero to any number of printable characters.
  2589. %P match zero to any number of non printable characters.
  2590. %u match zero to any number of unicode characters.
  2591. %U match zero to any number of non unicode characters.
  2592. If you want to match 1 digit use %+1d, if you want to match between 3
  2593. and 5 spaces use %+3..5s, if you want to match 0 or more word
  2594. characters use %+0..w, etc.
  2595. %+ match one to any number of characters.
  2596. %? match zero or one character.
  2597. %. match one character.
  2598. %* match zero to any number of characters.
  2599. %i matching becomes case insensitive.
  2600. %I matching becomes case sensitive (default).
  2601. The match is automatically stored to a value between %1 and %99
  2602. starting at %1 and incrementing by 1 for every regex. If you use
  2603. %15 as a regular expression, the next unnumbered regular expression
  2604. would be %16. To prevent a match from being stored use %!*, %!w, etc.
  2605. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #regexp {bli bla blo} {bli {.*} blo} {#show &amp;1}
  2606. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: Like an alias or function #regex has its own scope.
  2607. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#PCRE'>pcre</a> and <a href='#REPLACE'>replace</a>.
  2608. <a name='REPEAT'></a>
  2609. </span><span style='color:#5F5'> REPEAT
  2610. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #</span><span style='color:#FFF'>[</span><span style='color:#AAA'>number</span><span style='color:#FFF'>] {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2611. Sometimes you want to repeat the same command multiple times. This is the
  2612. easiest way to accomplish that.
  2613. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #10 {buy bread}
  2614. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#RETURN'>return</a> and <a href='#WHILE'>while</a>.
  2615. <a name='REPLACE'></a>
  2616. </span><span style='color:#5F5'> REPLACE
  2617. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #replace </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>oldtext</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>newtext</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2618. Searches the given variable, replacing each occurrence of 'oldtext'
  2619. with 'newtext'. The 'oldtext' argument is a regular expression.
  2620. Variables are stored in &amp;1 to &amp;99 with &amp;0 holding the entire matched
  2621. substring.
  2622. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #function rnd #math result 1d9;#replace test {%.} {@rnd{}}
  2623. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CAT'>cat</a>, <a href='#FORMAT'>format</a>, <a href='#FUNCTION'>function</a>, <a href='#LOCAL'>local</a>, <a href='#MATH'>math</a>, <a href='#SCRIPT'>script</a> and <a href='#VARIABLE'>variable</a>.
  2624. <a name='RETURN'></a>
  2625. </span><span style='color:#5F5'> RETURN
  2626. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #return </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2627. This command can be used to break out of a command string being
  2628. executed.
  2629. If used inside a #function you can use #return with an argument to both
  2630. break out of the function and set the result variable.
  2631. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BREAK'>break</a>, <a href='#CONTINUE'>continue</a>, <a href='#FOREACH'>foreach</a>, <a href='#LIST'>list</a>, <a href='#LOOP'>loop</a>, <a href='#PARSE'>parse</a>, <a href='#REPEAT'>repeat</a> and <a href='#WHILE'>while</a>.
  2632. <a name='RUN'></a>
  2633. </span><span style='color:#5F5'> RUN
  2634. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #run </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>shell command</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>file</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2635. The run command works much like the system command except that it
  2636. runs the command in a pseudo terminal. The run command also creates
  2637. a session that treats the given shell command as a server. This
  2638. allows you to run ssh, as well as any other shell application, with
  2639. full tintin scripting capabilities. If a file name is given the file
  2640. is loaded prior to execution.
  2641. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #run {somewhere} {ssh someone@somewhere.com}
  2642. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #run {something} {tail -f chats.log}
  2643. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#PORT'>port</a>, <a href='#SESSION'>session</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SNOOP'>snoop</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  2644. <a name='SCAN'></a>
  2645. </span><span style='color:#5F5'> SCAN
  2646. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #scan </span><span style='color:#FFF'>{</span><span style='color:#AAA'>abort</span><span style='color:#FFF'>|</span><span style='color:#AAA'>csv</span><span style='color:#FFF'>|</span><span style='color:#AAA'>tsv</span><span style='color:#FFF'>|</span><span style='color:#AAA'>txt</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>filename</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2647. The scan command is a file reading utility.
  2648. </span><span style='color:#FFF'>#scan {abort}
  2649. </span><span style='color:#AAA'> This command must be called from with a SCAN event and will
  2650. abort the scan if one is in progress.
  2651. </span><span style='color:#FFF'>#scan {csv} &lt;filename&gt;
  2652. </span><span style='color:#AAA'> The scan csv command reads in a comma separated value file
  2653. without printing the content to the screen. Instead it triggers one
  2654. of two events.
  2655. The SCAN CSV HEADER event is triggered on the first line of the csv
  2656. file. The SCAN CSV LINE event is triggered on the second and each
  2657. subsequent line of the csv file. The %0 argument contains the entire
  2658. line, with %1 containing the first value, %2 the second value, etc,
  2659. all the way up to %99.
  2660. Values containing spaces must be surrounded with quotes, keep in mind
  2661. newlines within quotes are not supported. Use two quotes to print one
  2662. literal quote character.
  2663. </span><span style='color:#FFF'> #scan {dir} &lt;filename&gt; &lt;variable&gt;
  2664. </span><span style='color:#AAA'>
  2665. The scan dir command will read the given filename or directory and
  2666. store any gathered information into the provided variable.
  2667. </span><span style='color:#FFF'>#scan {tsv} &lt;filename&gt;
  2668. </span><span style='color:#AAA'> The scan tsv &lt;filename&gt; command reads in a tab separated value file
  2669. without printing the content to the screen. Instead it triggers the
  2670. SCAN TSV HEADER event for the first line and SCAN TSV LINE for all
  2671. subsequent lines.
  2672. </span><span style='color:#FFF'>#scan {file} &lt;filename&gt; {commands}
  2673. </span><span style='color:#AAA'> The scan file command reads the given files and executes the
  2674. commands argument. &amp;0 contains the raw content of the file and
  2675. &amp;1 contains the plain content. &amp;2 contains the raw byte size of the
  2676. file and &amp;3 the plain byte size. &amp;5 contains the line count.
  2677. </span><span style='color:#FFF'>#scan {txt} &lt;filename&gt;
  2678. </span><span style='color:#AAA'> The scan txt &lt;filename&gt; command reads in a file and sends its content
  2679. to the screen as if it was send by a server. After using scan you can
  2680. use page-up and down to view the file.
  2681. This command is useful to convert ansi color files to html or viewing
  2682. raw log files.
  2683. Actions, highlights, and substitutions will trigger as normal, and it
  2684. is possible to create an action to execute #scan abort to prematurely
  2685. stop the scan.
  2686. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#READ'>read</a> and <a href='#TEXTIN'>textin</a>.
  2687. <a name='SCREEN'></a>
  2688. </span><span style='color:#5F5'> SCREEN
  2689. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #screen </span><span style='color:#FFF'>{</span><span style='color:#AAA'>option</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}
  2690. </span><span style='color:#AAA'>The screen command offers a variety of screen manipulation
  2691. commands and utilities.
  2692. </span><span style='color:#FFF'>#screen blur
  2693. </span><span style='color:#AAA'> Move the terminal to the back of the stack.
  2694. </span><span style='color:#FFF'>#screen clear [all|scroll region|square] &lt;args&gt;
  2695. </span><span style='color:#AAA'> Provide 4 arguments defining the top left and bottom right corner
  2696. when erasing a square.
  2697. </span><span style='color:#FFF'>#screen focus
  2698. </span><span style='color:#AAA'> Move the terminal to the front of the stack.
  2699. </span><span style='color:#FFF'>#screen fullscreen [on|off]
  2700. </span><span style='color:#AAA'> Toggles fullscreen mode when used without an argument.
  2701. </span><span style='color:#FFF'>#screen get &lt;option&gt; &lt;var&gt;
  2702. </span><span style='color:#AAA'> Get various screen options and save them to &lt;var&gt;. Use #screen
  2703. get without an argument to see all available options.
  2704. </span><span style='color:#FFF'>#screen info
  2705. </span><span style='color:#AAA'> Debugging information.
  2706. </span><span style='color:#FFF'>#screen inputregion &lt;square&gt; [name]
  2707. </span><span style='color:#AAA'> Set the input region. The name argument is optional and can be
  2708. used to create named RECEIVED INPUT [NAME] events.
  2709. </span><span style='color:#FFF'>#screen load &lt;both|label|title&gt;
  2710. </span><span style='color:#AAA'> Reload the saved title, label, or both.
  2711. </span><span style='color:#FFF'>#screen minimize &lt;on|off&gt;
  2712. </span><span style='color:#AAA'> Minimize with on, restore with off.
  2713. </span><span style='color:#FFF'>#screen maximize [on|off]
  2714. </span><span style='color:#AAA'> Maximize with on, restore with off.
  2715. </span><span style='color:#FFF'>#screen move &lt;height&gt; &lt;width&gt;
  2716. </span><span style='color:#AAA'> Move the upper left corner of the terminal to pixel coordinate.
  2717. </span><span style='color:#FFF'>#screen raise &lt;event&gt;
  2718. </span><span style='color:#AAA'> This will raise several screen events with %1 and %2 arguments.
  2719. </span><span style='color:#FFF'>#screen refresh
  2720. </span><span style='color:#AAA'> Terminal dependant, may do nothing.
  2721. </span><span style='color:#FFF'>#screen rescale &lt;height&gt; &lt;width&gt;
  2722. </span><span style='color:#AAA'> Resize the screen to the given height and width in pixels.
  2723. </span><span style='color:#FFF'>#screen resize &lt;rows&gt; &lt;cols&gt;
  2724. </span><span style='color:#AAA'> Resize the screen to the given height and width in characters.
  2725. </span><span style='color:#FFF'>#screen save &lt;both|label|title&gt;
  2726. </span><span style='color:#AAA'> Save the title, label, or both.
  2727. </span><span style='color:#FFF'>#screen scroll &lt;square&gt;
  2728. </span><span style='color:#AAA'> Set the scrolling region, changes the split setting.
  2729. </span><span style='color:#FFF'>#screen set &lt;both|label|title&gt;
  2730. </span><span style='color:#AAA'> Set the title, label, or both. Only title works on Windows.
  2731. </span><span style='color:#FFF'>#screen swap
  2732. </span><span style='color:#AAA'> Swap the input and scroll region.
  2733. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BELL'>bell</a>
  2734. <a name='SCREEN READER'></a>
  2735. </span><span style='color:#5F5'> SCREEN READER
  2736. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #config </span><span style='color:#FFF'>{</span><span style='color:#AAA'>SCREEN READER</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>ON|OFF</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2737. Screen reader mode is enabled by using #config screen on. The main
  2738. purpose of the screen reader mode is to report to servers that a
  2739. screen reader is being used by utilizing the MTTS standard. The MTTS
  2740. specification is available at:
  2741. http://tintin.sourceforge.net/protocols/mtts
  2742. With the screen reader mode enabled TinTin++ will try to remove visual
  2743. elements where possible.
  2744. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CONFIG'>config</a>
  2745. <a name='SCRIPT'></a>
  2746. </span><span style='color:#5F5'> SCRIPT
  2747. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #script </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>shell command</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2748. The script command works much like the system command except that it
  2749. treats the generated echos as commands if no variable is provided.
  2750. This is useful for running php, perl, ruby, and python scripts. You
  2751. can run these scripts either from file or from within tintin if the
  2752. scripting language allows this.
  2753. If you provide a variable the output of the script is stored as a list.
  2754. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #script {ruby -e 'print &quot;#show hello world&quot;'}
  2755. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #script {python -c 'print &quot;#show hello world&quot;'}
  2756. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #script {php -r 'echo &quot;#show hello world&quot;'}
  2757. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #script {path} {pwd};#show The path is &dollar;path[1].
  2758. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#FORMAT'>format</a>, <a href='#FUNCTION'>function</a>, <a href='#LOCAL'>local</a>, <a href='#MATH'>math</a>, <a href='#REPLACE'>replace</a> and <a href='#VARIABLE'>variable</a>.
  2759. <a name='SEND'></a>
  2760. </span><span style='color:#5F5'> SEND
  2761. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #send </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2762. Sends the text directly to the server, useful if you want to start
  2763. with an escape code.
  2764. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#TEXTIN'>textin</a>
  2765. <a name='SESSION'></a>
  2766. </span><span style='color:#5F5'> SESSION
  2767. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #session </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>host</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>port</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>file</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2768. Starts a telnet session with the given name, host, port, and optional
  2769. file name. The name can be anything you want, except the name of an
  2770. already existant session, a number, or the keywords '+' and '-'.
  2771. If a file name is given the file is only read if the session succesfully
  2772. connects.
  2773. Without an argument #session shows the currently defined sessions.
  2774. If you have more than one session, you can use the following commands:
  2775. #session {-} Switch to the previous session.
  2776. #session {+} Switch to the next session.
  2777. #session {&lt;number&gt;} Switch to the given session. Session 0 is the
  2778. startup session, +1 the first, +2 the second, and
  2779. -1 is the last session. Sessions are (currently)
  2780. sorted in order of creation.
  2781. #gts Switch to the startup session. The name gts stands
  2782. for global tintin session.
  2783. #ats Switch to the active session. The name ats stands
  2784. for active tintin session.
  2785. not necessarily the calling session.
  2786. #{name} Activates to the session with the given name.
  2787. #{name} {command}: Executes a command with the given session without
  2788. changing the active session.
  2789. @&lt;name&gt;{text}: Parse text in the given session, substituting the
  2790. variables and functions, and print the result in
  2791. the current active session.
  2792. The startup session is named 'gts' and can be used for relog scripts.
  2793. Do keep in mind that tickers do not work in the startup session.
  2794. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #event {SESSION DISCONNECTED} {#gts #delay 10 #ses %0 tintin.net 4321}
  2795. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#PORT'>port</a>, <a href='#RUN'>run</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SNOOP'>snoop</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  2796. <a name='SESSIONNAME'></a>
  2797. </span><span style='color:#5F5'> SESSIONNAME
  2798. </span><span style='color:#FFF'>Syntax</span><span style='color:#AAA'>: #[sessionname] </span><span style='color:#FFF'>{</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2799. You can create multiple sessions with the #session command. By default only one
  2800. session is active, meaning commands you input are executed in the active
  2801. session. While all sessions receive output, only output sent to the active
  2802. session is displayed.
  2803. When you create a session with the #session command you must specify a session
  2804. name, the session name, prepended with a hashtag, can be used to activate the
  2805. session when used without an argument. If an argument is given it will be
  2806. executed by that session as a command, the session will not be activated.
  2807. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #ses one tintin.net 23;#ses two tintin.net 23;#one;#two grin
  2808. This will create two sessions, the session that was created last (two in this
  2809. case) will be automatically activated upon creation. Using #one, session one is
  2810. activated. Using #two grin, the grin social will be executed by session two,
  2811. session one will remain the active session.
  2812. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#PORT'>port</a>, <a href='#RUN'>run</a>, <a href='#SESSION'>session</a>, <a href='#SNOOP'>snoop</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  2813. <a name='SHOWME'></a>
  2814. </span><span style='color:#5F5'> SHOWME
  2815. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #show </span><span style='color:#FFF'>{</span><span style='color:#AAA'>string</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>row</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>col</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2816. Display the string to the terminal, do not send to the server. Useful
  2817. for status, warnings, etc. The {row} and col number are optional and
  2818. work the same way as the row number of the #prompt trigger.
  2819. Actions can be triggered by the show command. If you want to avoid
  2820. this from happening use: #line ignore #show {&lt;string&gt;}.
  2821. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #tick {TICK} {#delay 50 #show 10 SECONDS TO TICK!!!} {60}
  2822. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: The #prompt helpfile contains more information on using the
  2823. option {row} and {col} arguments.
  2824. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#BUFFER'>buffer</a>, <a href='#DRAW'>draw</a>, <a href='#ECHO'>echo</a>, <a href='#GREP'>grep</a> and <a href='#PROMPT'>prompt</a>.
  2825. <a name='SNOOP'></a>
  2826. </span><span style='color:#5F5'> SNOOP
  2827. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #snoop </span><span style='color:#FFF'>{</span><span style='color:#AAA'>session name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>on</span><span style='color:#FFF'>|</span><span style='color:#AAA'>off</span><span style='color:#FFF'>|</span><span style='color:#AAA'>scroll</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2828. If there are multiple sessions active, this command allows you to
  2829. monitor what is going on in the sessions that are not currently active.
  2830. The line of text from other sessions will be prefixed by the session's
  2831. name.
  2832. You can toggle off snoop mode by executing #snoop a second time.
  2833. By using the scroll argument you will snoop the session's scroll
  2834. region which will overwrite the display of whichever session is active.
  2835. You can change the size and location of a session's scroll region by
  2836. using the #split and #screen scrollregion commands.
  2837. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#PORT'>port</a>, <a href='#RUN'>run</a>, <a href='#SESSION'>session</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  2838. <a name='SPEEDWALK'></a>
  2839. </span><span style='color:#5F5'> SPEEDWALK
  2840. SPEEDWALK V1
  2841. </span><span style='color:#AAA'>
  2842. Speedwalking allows you to enter multiple directions without using
  2843. semicolons. Directions should be prefixed with a number and will be
  2844. executed the given number of times.
  2845. You can enable speedwalking with #CONFIG {SPEEDWALK} {ON}.
  2846. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: Without speedwalk, you have to type:
  2847. </span><span style='color:#FFF'>s;s;w;w;w;w;w;s;s;s;w;w;w;n;n;w
  2848. </span><span style='color:#AAA'>With speedwalk, you only have to type:
  2849. </span><span style='color:#FFF'>2s5w3s3w2nw
  2850. </span><span style='color:#5F5'>SPEEDWALK V2
  2851. </span><span style='color:#AAA'>
  2852. Modern MUDs have increasingly adopted the use of diagonal exits, like
  2853. ne, nw, sw, and se. To make accomodations for this the #map and #path
  2854. command no longer interpret nesw as a speedwalk and require this to
  2855. be written as 1n1e1s1w, which then allows 2ne2e to execute ne;ne;e;e.
  2856. Speedwalks entered on the input line continue to use the v1 system.
  2857. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #path unzip 3n1e2nw
  2858. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #map move 3ne1d
  2859. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#CURSOR'>cursor</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a> and <a href='#TAB'>tab</a>.
  2860. <a name='SPLIT'></a>
  2861. </span><span style='color:#5F5'> SPLIT
  2862. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #split </span><span style='color:#FFF'>{</span><span style='color:#AAA'>top bar</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>bottom bar</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>left bar</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>right bar</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>input bar</span><span style='color:#FFF'>}
  2863. </span><span style='color:#AAA'>
  2864. This option requires for your terminal to support VT100 emulation.
  2865. #split allows the creation of a top status bar, a left and right status
  2866. bar, a scrolling region, a bottom status bar, and an input line.
  2867. </span><span style='color:#0AA'>╭────────────────────────────────╮
  2868. │</span><span style='color:#FFF'> top bar </span><span style='color:#0AA'> │
  2869. ├──────┬──────────────────┬──────┤
  2870. │</span><span style='color:#FFF'> left </span><span style='color:#0AA'>│</span><span style='color:#FFF'> scrolling </span><span style='color:#0AA'>│</span><span style='color:#FFF'> right</span><span style='color:#0AA'>│
  2871. │</span><span style='color:#FFF'> bar </span><span style='color:#0AA'>│</span><span style='color:#FFF'> region </span><span style='color:#0AA'>│</span><span style='color:#FFF'> bar </span><span style='color:#0AA'>│
  2872. ├──────┴──────────────────┴──────┤
  2873. │</span><span style='color:#FFF'> bottom bar </span><span style='color:#0AA'> │
  2874. ├────────────────────────────────┤
  2875. │</span><span style='color:#FFF'> input bar </span><span style='color:#0AA'> │
  2876. ╰────────────────────────────────╯
  2877. </span><span style='color:#AAA'>
  2878. By default the bottom status bar is filled with dashes --- and
  2879. subsequently it is also known as the split line. The scrolling
  2880. region is also known as the main screen and this is where all
  2881. incoming text is displayed by default.
  2882. If you use #split without an argument it will set the height of the
  2883. top status bar to 0 lines and the bottom status bar to 1 line.
  2884. If you use #split with one argument it will set the height of the top
  2885. status bar to the given number of lines and the bottom status bar will
  2886. be set to 1 line.
  2887. If you use two arguments the first argument is the height of the top
  2888. status bar and the second argument the height of the bottom status bar.
  2889. The third and fourth argument are optional and default to 0.
  2890. The fifth argument is optional and sets the size of the input bar, it
  2891. defaults to 1.
  2892. It is possible to use negative arguments in which case the bar width
  2893. defines the minimum width of the scrolling region.
  2894. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #split 0 0
  2895. This will create a split screen with just a scrolling region and an
  2896. input line. Great for the minimalist.
  2897. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #split 1 1 0 -80
  2898. This will create a split screen with a single line top and bottom
  2899. bar. The left bar has a width of 0 while the right bar will be of
  2900. variable width. If for example the screen is 100 columns wide, 80
  2901. columns will be used for the scrolling region, leaving a right bar
  2902. with a width of 20 columns.
  2903. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can display text on the split line(s) with the #prompt and
  2904. #show {line} {row} commands.
  2905. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove split mode with the #unsplit command.
  2906. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#PROMPT'>prompt</a> and <a href='#SHOWME'>showme</a>.
  2907. <a name='SSL'></a>
  2908. </span><span style='color:#5F5'> SSL
  2909. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #ssl </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>host</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>port</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>file</span><span style='color:#FFF'>}
  2910. Starts a secure socket telnet session with the given name, host, port,
  2911. and optional file name.
  2912. Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#PORT'>port</a>, <a href='#RUN'>run</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SNOOP'>snoop</a>, <a href='#SSL'>ssl</a> and <a href='#ZAP'>zap</a>.
  2913. <a name='STATEMENTS'></a>
  2914. </span><span style='color:#5F5'> STATEMENTS
  2915. </span><span style='color:#AAA'>
  2916. TinTin++ knows the following statements.
  2917. #break
  2918. #case {value} {true}
  2919. #continue
  2920. #default {commands}
  2921. #else {commands}
  2922. #elseif {expression} {true}
  2923. #foreach {list} {variable} {commands}
  2924. #if {expression} {true}
  2925. #loop {min} {max} {variable} {commands}
  2926. #parse {string} {variable} {commands}
  2927. #return {value}
  2928. #switch {expression} {commands}
  2929. #while {expression} {commands}
  2930. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#COMMANDS'>commands</a>, <a href='#HELP'>help</a> and <a href='#INFO'>info</a>.
  2931. <a name='SUBSTITUTE'></a>
  2932. </span><span style='color:#5F5'> SUBSTITUTE
  2933. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #substitute </span><span style='color:#FFF'>{</span><span style='color:#AAA'>text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>new text</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>priority</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2934. Allows you to replace text from the server with the new text.
  2935. The %1-%99 variables can be used to capture text and use it as part of
  2936. the new output.
  2937. Color codes can be used to color the new text, to restore the color to
  2938. that of the original line the &lt;900&gt; color code can be used.
  2939. If only one argument is given, all active substitutions that match the
  2940. argument are displayed. Wildcards can be used, see '#help regex' for
  2941. additional information on that subject.
  2942. If no argument is given, all subs are displayed.
  2943. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {Zoe} {ZOE}
  2944. Any instance of Zoe will be replaced with ZOE.
  2945. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {~&bsol;e[0;34m} {&bsol;e[1;34m}
  2946. Replace generic dark blue color codes with bright blue ones.
  2947. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #sub {%1massacres%2} {&lt;018&gt;%1&lt;118&gt;MASSACRES&lt;018&gt;%2}
  2948. Replaces all occurrences of 'massacres' with 'MASSACRES' in red.
  2949. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help action', for more information about triggers.
  2950. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help colors', for more information.
  2951. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a substitution with the #unsubstitute command.
  2952. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ACTION'>action</a>, <a href='#GAG'>gag</a>, <a href='#HIGHLIGHT'>highlight</a> and <a href='#PROMPT'>prompt</a>.
  2953. <a name='SUSPEND'></a>
  2954. </span><span style='color:#5F5'> SUSPEND
  2955. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #cursor suspend
  2956. Temporarily suspends tintin and returns you to your shell. To
  2957. return to tintin, type 'fg' at the shell prompt.
  2958. While suspended your tintin sessions will freeze. To keep a
  2959. suspended session running use the #detach command.
  2960. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#END'>end</a>
  2961. <a name='SWITCH'></a>
  2962. </span><span style='color:#5F5'> SWITCH
  2963. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #switch </span><span style='color:#FFF'>{</span><span style='color:#AAA'>conditional</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>arguments</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2964. The switch command works similar to the switch statement in other
  2965. languages. When the 'switch' command is encountered its body is parsed
  2966. and each 'case' command found will be compared to the conditional
  2967. argument of the switch and executed if there is a match.
  2968. When comparing strings both the switch and case arguments must be
  2969. enclosed in quote characters.
  2970. If the 'default' command is found and no 'case' statement has been
  2971. matched the default command's argument is executed.
  2972. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #switch {1d4} {#case 1 cackle;#case 2 smile;#default giggle}
  2973. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#STATEMENTS'>statements</a>
  2974. <a name='SYSTEM'></a>
  2975. </span><span style='color:#5F5'> SYSTEM
  2976. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #system </span><span style='color:#FFF'>{</span><span style='color:#AAA'>command</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2977. Executes the command specified as a shell command.
  2978. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#DETACH'>detach</a>, <a href='#SCRIPT'>script</a> and <a href='#RUN'>run</a>.
  2979. <a name='TAB'></a>
  2980. </span><span style='color:#5F5'> TAB
  2981. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #tab </span><span style='color:#FFF'>{</span><span style='color:#AAA'>word</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2982. Adds a word to the tab completion list, alphabetically sorted.
  2983. If no tabs are defined tintin will use the scrollback buffer for auto
  2984. tab completion.
  2985. Tabbing behavior can be modified with the #cursor tab command which
  2986. by default is bound to the tab key.
  2987. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a tab with the #untab command.
  2988. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALIAS'>alias</a>, <a href='#CURSOR'>cursor</a>, <a href='#HISTORY'>history</a>, <a href='#KEYPAD'>keypad</a>, <a href='#MACRO'>macro</a> and <a href='#SPEEDWALK'>speedwalk</a>.
  2989. <a name='TEXTIN'></a>
  2990. </span><span style='color:#5F5'> TEXTIN
  2991. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #textin </span><span style='color:#FFF'>{</span><span style='color:#AAA'>filename</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>delay</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  2992. Textin allows the user to read in a file, and send its contents
  2993. directly to the server. Useful for doing online creation, or message
  2994. writing.
  2995. The delay is in seconds and takes a floating point number which is
  2996. cumulatively applied to each outgoing line.
  2997. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#SCAN'>scan</a> and <a href='#SEND'>send</a>.
  2998. <a name='TICKER'></a>
  2999. </span><span style='color:#5F5'> TICKER
  3000. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #ticker </span><span style='color:#FFF'>{</span><span style='color:#AAA'>name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>interval in seconds</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  3001. Executes given command every # of seconds. Floating point precision
  3002. for the interval is allowed. A ticker cannot fire more often than
  3003. 10 times per second.
  3004. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: Tickers don't work in the startup session.
  3005. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a ticker with the #unticker command.
  3006. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#DELAY'>delay</a> and <a href='#EVENT'>event</a>.
  3007. <a name='TIME'></a>
  3008. </span><span style='color:#5F5'> TIME
  3009. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>%t</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  3010. The %t format specifier of the #format command allows printing dates
  3011. using the strftime() format specifiers. By default the time stamp used
  3012. is the current time, if you want to print a past or future date use:
  3013. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #format </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>%t</span><span style='color:#FFF'>} {{</span><span style='color:#AAA'>argument</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>epoch time</span><span style='color:#FFF'>}}</span><span style='color:#AAA'>
  3014. The current epoch time value is obtained using #format {time} {%T}.
  3015. When using %t the argument should contain strftime format specifiers.
  3016. The output may differ depending on your locale.
  3017. %a Abbreviated name of the day of the week (mon ... sun).
  3018. %A Full name of the day of the week. (Monday ... Sunday)
  3019. %b Abbreviated name of the month (Jan ... Dec)
  3020. %B Full name of the month. (January ... December)
  3021. %C 2 digit numeric century. (19 ... 20)
  3022. %d 2 digit numeric day of the month (01 ... 31)
  3023. %H 2 digit numeric 24-hour clock hour. (00 ... 23)
  3024. %I 2 digit numeric 12-hour clock hour. (01 ... 12)
  3025. %j 3 digit numeric day of the year (001 ... 366)
  3026. %m 2 digit numeric month of the year (01 ... 12)
  3027. %M 2 digit numeric minute of the hour (00 ... 59)
  3028. %p Abbreviated 12 hour clock period (AM ... PM)
  3029. %P Abbreviated 12 hour clock period (am ... pm)
  3030. %S 2 digit numeric second of the minute (00 ...59
  3031. %u 1 digit numeric day of the week (1 ... 7)
  3032. %U 2 digit numeric Sunday week of the year (00 ... 53
  3033. %w 1 digit numeric day of the week (0 ... 6)
  3034. %W 2 digit numeric Monday week of the year (00 ... 53
  3035. %y 2 digit numeric year. (70 ... 38)
  3036. %Y 4 digit numeric year. (1970 ... 2038)
  3037. %z 5 digit timezone offset. (-1200 ... +1400)
  3038. %Z Abbreviated name of the time zone.
  3039. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ECHO'>echo</a>, <a href='#EVENT'>event</a> and <a href='#FORMAT'>format</a>.
  3040. <a name='VARIABLE'></a>
  3041. </span><span style='color:#5F5'> VARIABLE
  3042. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #variable </span><span style='color:#FFF'>{</span><span style='color:#AAA'>variable name</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>text to fill variable</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  3043. Variables differ from the %0-99 arguments in the fact that you can
  3044. specify a full word as a variable, and they stay in memory for the
  3045. full session unless they are changed. They can be saved in the
  3046. coms file, and can be set to different values if you have two or
  3047. more sessions running at the same time. Variables are global for
  3048. each session and can be accessed by adding a &dollar; before the variable
  3049. name.
  3050. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #alias {target} {#var target %0}
  3051. #alias {x} {kick &dollar;target}
  3052. The name of a variable must exist of only letters, numbers and
  3053. underscores in order to be substituted. If you do not meet these
  3054. requirements do not panic, simply encapsulate the variable in braces:
  3055. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #variable {cool website} {http://tintin.sourceforge.net}
  3056. #chat I was on &dollar;{cool website} yesterday!.
  3057. Variables can be escaped by adding additional &dollar; signs.
  3058. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #var test 42;#showme &dollar;&dollar;test
  3059. Variables can be nested using brackets:
  3060. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #var hp[self] 34;#var hp[target] 46
  3061. You can see the first nest of a variable using &dollar;variable[+1] and the
  3062. last nest using &dollar;variable[-1]. Using &dollar;variable[-2] will report the
  3063. second last variable, and so on. To show all indices use *variable[].
  3064. To show all values use &dollar;variable[%*] or a less generic regex. To show
  3065. all values from index 2 through 4 use &dollar;variable[+2..4].
  3066. Nested variables are also known as tables, table generally being used
  3067. to refer to several variables nested within one specific variable.
  3068. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show {Targets starting with the letter A: &dollar;targets[A%*]
  3069. To see the internal index of a variable use &amp;&lt;variable name&gt;. To see
  3070. the size of a table you would use: &amp;targets[] or &amp;targets[%*]. A non
  3071. existent nested variable will report itself as 0.
  3072. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #show {Number of targets starting with A: &amp;targets[A%*]
  3073. In some scripts you need to know the name of a nested variable. This
  3074. is also known as the key, and you can get it using *variable. For
  3075. example *target[+1]. To get the first variable's name use *{+1}.
  3076. It's also possible to declare a table using brace notation. Using
  3077. #var hp[self] 34 is the equivalent of #var {hp} {{self}{34}}. This
  3078. also allows merging tables. #var hp[self] 34;#var hp[target] 46 is
  3079. the equivalent of #var {hp} {{self}{34} {target}{46}} as well as
  3080. #var {hp} {{self}{34}} {{target}{46}} or if you want to get creative
  3081. the equivalent of #var hp[self] 34;#var {hp} {&dollar;hp} {{target}{46}}.
  3082. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: You can remove a variable with the #unvariable command.
  3083. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#CAT'>cat</a>, <a href='#FORMAT'>format</a>, <a href='#FUNCTION'>function</a>, <a href='#LOCAL'>local</a>, <a href='#MATH'>math</a>, <a href='#REPLACE'>replace</a> and <a href='#SCRIPT'>script</a>.
  3084. <a name='WHILE'></a>
  3085. </span><span style='color:#5F5'> WHILE
  3086. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #while </span><span style='color:#FFF'>{</span><span style='color:#AAA'>conditional</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>commands</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  3087. This command works similar to a 'while' statement in other languages.
  3088. When a 'while' command is encourated, the conditional is evaluated,
  3089. and if TRUE (any non-zero result) the commands are executed. The
  3090. 'while' loop will be repeated indefinitely until the conditional is
  3091. FALSE or the #BREAK or #RETURN commands are found.
  3092. The 'while' statement is only evaluated if it is read, so you must
  3093. nest it inside a trigger, like an alias or action.
  3094. The conditional is evaluated exactly the same as in the 'math' command.
  3095. </span><span style='color:#FFF'>Example</span><span style='color:#AAA'>: #math cnt 0;#while {&dollar;cnt &lt; 20} {#math cnt &dollar;cnt + 1;say &dollar;cnt}
  3096. </span><span style='color:#FFF'>Comment</span><span style='color:#AAA'>: See '#help math', for more information.
  3097. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#STATEMENTS'>statements</a>
  3098. <a name='WRITE'></a>
  3099. </span><span style='color:#5F5'> WRITE
  3100. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #write </span><span style='color:#FFF'>{</span><span style='color:#AAA'>&lt;filename&gt;</span><span style='color:#FFF'>} {</span><span style='color:#AAA'>[FORCE]</span><span style='color:#FFF'>}</span><span style='color:#AAA'>
  3101. Writes all current actions, aliases, subs, highlights, and variables
  3102. to a command file, specified by filename.
  3103. By default you cannot write to .map files to prevent accidentally
  3104. overwriting a map file. Use the FORCE argument to ignore this
  3105. protection.
  3106. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#LOG'>log</a>, <a href='#READ'>read</a>, <a href='#SCAN'>scan</a> and <a href='#TEXTIN'>textin</a>.
  3107. <a name='ZAP'></a>
  3108. </span><span style='color:#5F5'> ZAP
  3109. </span><span style='color:#FFF'>Command</span><span style='color:#AAA'>: #zap {[session]}
  3110. Kill your current session. If there is no current session, it will
  3111. cause the program to terminate. If you provide an argument it'll zap
  3112. the given session instead.
  3113. </span><span style='color:#FFF'>Related</span><span style='color:#AAA'>: <a href='#ALL'>all</a>, <a href='#PORT'>port</a>, <a href='#RUN'>run</a>, <a href='#SESSION'>session</a>, <a href='#SESSIONNAME'>sessionname</a>, <a href='#SNOOP'>snoop</a> and <a href='#SSL'>ssl</a>.