User Tools

Site Tools


python_functions

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
python_functions [2020/05/28 11:28] g00r00python_functions [2020/09/12 17:00] g00r00
Line 22: Line 22:
 | [[python_functions#Function: RWRITE|rwrite]]     | Send raw string to the user                          | | [[python_functions#Function: RWRITE|rwrite]]     | Send raw string to the user                          |
 | [[python_functions#Function: RWRITE|rwriteln]]   | Send raw string to the user with a carriage return   | | [[python_functions#Function: RWRITE|rwriteln]]   | Send raw string to the user with a carriage return   |
 +| [[python_functions#Function: SHOWFILE|showfile]] | Display a file to the user                           |
 | [[python_functions#Function: WRITE|write]]       | Send string to the user with MCI filtering           | | [[python_functions#Function: WRITE|write]]       | Send string to the user with MCI filtering           |
 | [[python_functions#Function: WRITELN|writeln]]   | Send string to the user with MCI filtering and CRLF  | | [[python_functions#Function: WRITELN|writeln]]   | Send string to the user with MCI filtering and CRLF  |
Line 87: Line 88:
     The above example will print "|12Welcome, <UserName>" to the     The above example will print "|12Welcome, <UserName>" to the
     user and then move the cursor to the next line.     user and then move the cursor to the next line.
 +
 +=== Function: SHOWFILE ===
 +
 +    Syntax: showfile (filename, baudrate, allowpause, allowabort, 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 allowpause parameter can be set to 1 to allow screen pausing
 +    
 +    The allowabort parameter can be set to 1 to allow aborting display 
 +    
 +    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 === === Function: WRITE ===
Line 190: Line 224:
   * setpinfo   * setpinfo
   * setprompt   * setprompt
-  * showfile+  * [[python_functions#Function: SHOWFILE|showfile]]
   * shutdown   * shutdown
   * stuffkey   * stuffkey
python_functions.txt · Last modified: 2023/01/20 01:57 by g00r00

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki