User Tools

Site Tools


doc:lua_make-your-own-scripts

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
doc:lua_make-your-own-scripts [2014/08/17 12:53] – [The Communication Commands] admindoc:lua_make-your-own-scripts [2014/10/05 16:37] – [The IO Commands] admin
Line 170: Line 170:
 ==== The IO  Commands ==== ==== The IO  Commands ====
  
-FIXME the whole IO section is in pure experimental state. There's no guarantee that these functions are even exist, are implemented as described or not subject to change.+FIXME the whole IO command section is in pure experimental state. There's no guarantee that these functions are even exist, are implemented as described or not subject to change.
  
  
Line 177: Line 177:
 Similar to the LUA simple IO model, OOBD has always only just input and output file handle. As long as not redirected, these are stdin and stdout. Similar to the LUA simple IO model, OOBD has always only just input and output file handle. As long as not redirected, these are stdin and stdout.
  
-As OOBD knows more as only one type of data sources, filenames are given as URL, not just as simple path.+As OOBD knows more as only one type of data sources, the parameter ''message'' is misused to control the behaviour.
  
 +.
  
  
  
-=== ioInput(URL[,file_extension[,message]]) === 
  
-Set the actual input file stream to URL, where URL could be+=== ioInput(file name ,file_extension,message) === 
 + 
 +Tries to open the file accourding to the following parameter combinations: 
 + 
 + 
 + 
 +^  filename  ^  message  ^  Effect 
 +| /unix-path/.. | any message | Open a file Open dialog with preselected path (and file). At success returns the file path, otherwise null | 
 +| /unix-path/.. | 'direct' | Open the given file without Dialog, At success returns the file path, otherwise null | 
 +| URL like ''HTTP:<nowiki>//</nowiki>''.. | 'html' | Reads the URL as input.At  success returns the URL, otherwise null || 
 +URL like ''HTTP:<nowiki>//</nowiki>''.. | a lua table | JSON-RFC call: If the parameter message is a lua table, it's translated into a JSON string and send as POST to the given URL. After evaluation, the server returns a JSON string converted into a lua table and returned by the function | 
  
-^  URL  ^  Description  ^ 
-| ''FILE:<nowiki>//</nowiki>'' | Opens a file in the users file system. If the given file path is empty, just a directory or the given file does not exist, a file dialog opens. If given, the message and file_extension are used in the dialog | 
-| ''SCRIPT:<nowiki>//</nowiki>''| Opens a file in the script archive file system.  | 
  
  
doc/lua_make-your-own-scripts.txt · Last modified: 2019/04/08 18:43 by admin