User Tools

Site Tools


python_functions

This is an old revision of the document!


Python Functions

This page is a work in progress. Please follow this format closely if making changes, and be sure to include anchors from the A-Z list at the bottom as well as the table at each section.

Optionally maybe these 4 main sections should be their own page I am open to suggestion, although I worked hard to come up with a system where all of this information could be viewed and accessed quickly as it grows within a single page.

MPL documentation should follow this same layout for consistency.

1234567890123456789012345678901234567890123456789012345678901234567890123456789


Output Functions

Function Description
pwrite Send pipe string to the user
pwriteln Send pipe string to the user with a carriage return
rwrite Send raw string to the user
rwriteln Send raw string to the user with a carriage return
showfile Display a file to the user
write Send string to the user with MCI filtering
writeln Send string to the user with MCI filtering and CRLF

Function: PWRITE

  Syntax: pwrite (string)
  
  This function accepts a string parameter and will send the contents of the
  string to the user, processing any pipe color codes properly but ignoring other
  MCI codes.

  Example:

    rwrite("|12Welcome, |UH")
  
  The above example will print "Welcome, |UH" to the user with a red color.  Note
  that the MCI code containing the user name was not translated.

Function: PWRITELN

  Syntax: pwriteln (string)
  
  This function accepts a string parameter and will send the contents of the
  string to the user, processing any pipe color codes properly but ignoring other
  MCI codes.  A CRLF is sent at the end, moving the cursor to the next line.

  Example:

    pwriteln("|12Welcome, |UH")
  
  The above example will print "Welcome, |UH" to the user with a red color.  Note
  that the MCI code containing the user name was not translated.

Function: RWRITE

  Syntax: rwrite (string)
  
  Raw write. This function accepts a string parameter and will send the
  contents of the string to the user.  This function does NOT filter
  out color or MCI codes nor does it move to the next line.

  Example:

    rwrite("|12Welcome, |UH")
  
  The above example will print "|12Welcome, <UserName>" to the user.
  Note that the color code was untouched.

Function: RWRITELN

  Syntax: rwriteln (string)
  
  This function accepts a string parameter and will send the contents
  of the string to the user followed by a carrage return to move the
  cursor to the next line.  This function will NOT decode color codes
  or MCI codes.
  Example:

    rwriteln("|12Welcome, |UH")
  
  The above example will print "|12Welcome, <UserName>" to the
  user and then move the cursor to the next line.

Function: SHOWFILE

  Syntax: showfile (filename, baudrate, pause, abort, onlynew) : boolean
  
  This function accepts the filename string followed by several boolean
  options represented as 1 for true or 0 for false.
  
  The filename parameter can be a base filename such as "myfile" and Mystic
  will calculate the file extension based on the user's terminal settings
  and random display file system.  If a file extension is supplied then
  Mystic will not attempt to do any calculation based on terminal or
  random files.  The filename can also include a path, but if one is
  excluded it will display from the current theme's text directory or
  a theme that is inherited by the current theme.
  
  The baudrate parameter contains the baudrate that will be emulated when
  the file is displayed, or it can be set to zero for full speed.  The
  baud rate emulation is done by Mystic itself and does not require any
  specific terminal compatibility or extension; it works on all terminals
  
  The pause parameter can be set to 1 to allow screen pausing
  
  The abort parameter can be set to 1 to allow aborting with spacebar
  
  The onlynew parameter can be set to 1 to display the file only if its
  modification date is newer than the user's last call.
  
  The showfile function returns a TRUE result if the file was found and
  displayed or false if not.
  
  Example:
  
    showfile("c:\myfile.txt", 0, 1, 1, 0)
    showfile("loginansi", 19200, 0, 0, 0)

Function: WRITE

  Syntax: write (string)
  
  This function accepts a string parameter and will send the contents
  of the string to the user.  This function will decode all pipe color
  codes and MCI codes in the process.  Note that this function does not
  move the cursor to the next line.

  Example:

    write("|12Welcome, |UH")
  
  The above example will print "Welcome, <UserName>" in Red to the
  user.

Function: WRITELN

  Syntax: writeln (string)
  
  This function accepts a string parameter and will send the contents
  of the string to the user followed by a carrage return to move the
  cursor to the next line.  This function will decode all pipe color
  codes and MCI codes in the process.

  Example:

    writeln("|12Welcome, |UH")
  
  The above example will print "Welcome, <UserName>" in Red to the
  user and then move the cursor to the next line.

Input Functions


BBS Data Access Functions


Miscellaneous Functions


Function List A to Z

  • access
  • acsnogroup
  • backspace
  • charxy
  • dated2u
  • datestr
  • dateu2d
  • delay
  • fl_close
  • fl_found
  • fl_getdesc
  • fl_getfile
  • fl_open
  • fl_prev
  • fl_next
  • fl_seek
  • flush
  • getcfg
  • getfbase
  • getfbaseid
  • getfgroup
  • getfgroupid
  • getkey
  • getmbase
  • getmbaseid
  • getmgroup
  • getmgroupid
  • getnetaddr
  • getprompt
  • getstr
  • getuser
  • getuserid
  • getyn
  • gotoxy
  • keypressed
  • logerror
  • mci2str
  • menucmd
  • msg_close
  • msg_delete
  • msg_found
  • msg_gethdr
  • msg_gettxt
  • msg_next
  • msg_open
  • msg_prev
  • msg_seek
  • msg_stats
  • onekey
  • param_count
  • param_str
  • purgeinput
  • setpinfo
  • setprompt
  • shutdown
  • stuffkey
  • sysoplog
  • textattr
  • textcolor
  • upuser
  • wherex
  • wherey
python_functions.1599948824.txt.gz · Last modified: 2020/09/12 17:13 by g00r00

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki