Kalgoorlie Retro Docs

Documentation for the Kalgoorlie Retro BBS, its games and servers

User Tools

Site Tools


lanternterminal:scripting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lanternterminal:scripting [2026-11-08 03:15] – Update Lantern Terminal guides for 0.3.0 slatermlanternterminal:scripting [2026-11-08 08:49] (current) – Update Lantern Terminal guides for 0.4.0 slaterm
Line 1: Line 1:
 ====== Scripting ====== ====== Scripting ======
  
-Scripts can use Python or bundled Lua 5.4.9. Choose a ''.py'' or ''.lua'' file in **Script → Run**; logon scripts, saved script commands and ''--script'' also accept both. Use **Script → Cancel** to stop the current tab’s worker. Script errors appear in the Activity pane. The [[https://retro.theiguru.au/lantern-terminal/docs/LUA-SCRIPTING.md|Lua scripting guide]] includes its syntax and API reference. +Scripts can use Python or bundled Lua 5.4.9. Choose a ''.py'' or ''.lua'' file in **Script → Run**; logon scripts, saved script commands and ''--script'' also accept both. Use **Script → Cancel** to stop the current tab’s worker. Script errors appear in the Activity pane. A session that is still logging in counts as open, so a script can wait for a password, passphrase or host-key prompt and answer it with ''Send''. The [[https://retro.theiguru.au/lantern-terminal/docs/LUA-SCRIPTING.md|Lua scripting guide]] includes its syntax and API reference.
- +
-[[lanternterminal:lua|Lua API guide and examples]]+
  
 ===== Python ===== ===== Python =====
Line 26: Line 24:
  
   * ''app.Version'', ''app.Arguments.Count/GetArg(0)'', ''app.GetScriptTab()'', ''app.GetActiveTab()'', ''app.GetTabCount()'', ''app.GetTab(1)'', ''app.Sleep(milliseconds)'' and ''app.Quit()''.   * ''app.Version'', ''app.Arguments.Count/GetArg(0)'', ''app.GetScriptTab()'', ''app.GetActiveTab()'', ''app.GetTabCount()'', ''app.GetTab(1)'', ''app.Sleep(milliseconds)'' and ''app.Quit()''.
-  * Tabs: ''Caption'', one-based ''Index'', ''Screen'', ''Session'', ''Activate()'', ''Clone()'', ''Close()'', ''ConnectSftp()'', ''ResetCaption()''.+  * Tabs: ''Caption'', one-based ''Index'', ''Screen'', ''Session'', ''Activate()'', ''Clone()'', ''Close()'', ''ConnectSftp()'', ''ResetCaption()'', ''ZmodemUpload(files)'' (queue files for the host's Zmodem receiver), ''ZmodemCancel()'', ''ZmodemActive()''.
   * Screen: ''Rows'', ''Columns'', one-based ''CurrentRow/CurrentColumn'', ''Selection'', ''Send(text)'', binary ''SendBytes(data)'', ''Get/Get2(top,left,bottom,right)'', ''Clear()'', ''SendKeys()'', ''SendSpecial()'', ''WaitForCursor()'', ''WaitForString()'', ''WaitForStrings()'' and ''ReadString()''.   * Screen: ''Rows'', ''Columns'', one-based ''CurrentRow/CurrentColumn'', ''Selection'', ''Send(text)'', binary ''SendBytes(data)'', ''Get/Get2(top,left,bottom,right)'', ''Clear()'', ''SendKeys()'', ''SendSpecial()'', ''WaitForCursor()'', ''WaitForString()'', ''WaitForStrings()'' and ''ReadString()''.
   * Matching: ''IgnoreCase'', capture ''IgnoreEscape'', ''Synchronous'' and ''MatchIndex''. Wait timeouts default to seconds; zero waits until match/disconnect/cancellation. ''WaitForStrings'' returns one-based index or zero on timeout; ''WaitForString'' returns a boolean. ''ReadString'' excludes the matched delimiter and returns empty text on timeout.   * Matching: ''IgnoreCase'', capture ''IgnoreEscape'', ''Synchronous'' and ''MatchIndex''. Wait timeouts default to seconds; zero waits until match/disconnect/cancellation. ''WaitForStrings'' returns one-based index or zero on timeout; ''WaitForString'' returns a boolean. ''ReadString'' excludes the matched delimiter and returns empty text on timeout.
lanternterminal/scripting.1794107737.txt.gz · Last modified: by slaterm