lua-akfavatar(1)                                              lua-akfavatar(1)



NNAAMMEE
       lua-akfavatar - Lua interpreter for the AKFAvatar user interface

SSYYNNOOPPSSIISS
       lluuaa--aakkffaavvaattaarr [[_o_p_t_i_o_n_s]] [[ _s_c_r_i_p_t [[_a_r_g_s]] ]]

DDEESSCCRRIIPPTTIIOONN
       The program lua-akfavatar is the Lua interpreter for the AKFAvatar user
       interface.  It loads and executes Lua scripts in source form (not byte‐
       code).   Either  Lua scripts can be loaded or "..aavvtt" demo files.  If no
       _s_c_r_i_p_t is given, it starts with a file-selector.

       The given _a_r_g_s are available to _s_c_r_i_p_t as strings  in  a  global  table
       named  aarrgg.   The  _s_c_r_i_p_t  itself  is  in aarrgg[[00]], the first argument is
       aarrgg[[11]] and so on.

       You have to use the command llooccaall _a_v_t == rreeqquuiirree _"_l_u_a_-_a_k_f_a_v_a_t_a_r_" to  get
       access to the AKFAvatar specific functions.

       With  the  file-selector  you can also see documentation files with the
       file extension "..aabboouutt".  These can be simple  text  files  encoded  in
       UTF-8 or plain ASCII.  They can use the "overstrike" technique for bold
       or underlined text.  You can for example use  the  text-setting  system
       "groff" to generate such files.
       Furthermore GNU info files with the file extension "..iinnffoo" can be shown
       as text (no support for hyperlinks).

OOPPTTIIOONNSS
       -h
       --help print a short help-message

       -v
       --version
              print version information

       -l _[_v_a_r_=_]_n_a_m_e
              call rreeqquuiirree((_"_n_a_m_e_")) before executing the script.  Sets a global
              variable   with  the  _n_a_m_e  or  _v_a_r.   Typically  used  to  load
              libraries.

       -f
       --fullscreen
              start in fullscreen mode (only if no script is given)

       -F
       --Fullscreen
              start in fullscreen mode without switching the resolution  (only
              if no script is given)

       --dir=_d_i_r
              start  the file-selector in that directory (only if no script is
              given)

EENNVVIIRROONNMMEENNTT
       LUA_PATH_5_2
       LUA_PATH
              searchpath for Lua modules.  Templates are separated with  semi‐
              colons.   A question mark (??)  is replaced with the module name.
              A dot in the module name is replaced with the directory  separa‐
              tor.  Two semicolons ((;;;;)) add the default path.

       LUA_CPATH_5_2
       LUA_CPATH
              searchpath for C modules.  Syntax like in _L_U_A___P_A_T_H.

       AVTDATAPATH
              searchpath  for  data  files (images, audio, texts...).  It gets
              stored in the variable aavvtt..ddaattaappaatthh and can  be  used  with  the
              function  aavvtt..sseeaarrcchh((_f_i_l_e_n_a_m_e))_.   The  directories are separated
              with semicolons.  Unlike the former paths there are no templates
              with question marks.

EEXXAAMMPPLLEE
       local avt = require "lua-akfavatar"
       avt.encoding("UTF-8")
       avt.title("my first program")
       avt.start()
       avt.avatar_image("default")
       avt.say("Hello there!\n")
       local name = avt.ask("What's your name? ")
       avt.say("Hello, ", name, ". Nice to meet you!\n")
       avt.wait_button()

SSEECCUURRIITTYY
       Lua  is  a complete programming language.  There are no sandbox limita‐
       tions.  Any such programming language can be misused to write malicious
       code.   So  keep  in  mind  that Lua scripts are programs and should be
       treated with the same care as other programs.  Some other  input  files
       for Lua-AKFAvatar could contain code, too.

AAUUTTHHOORRSS
       AKFAvatar
       Lua-AKFAvatar   Andreas K. Foerster

       Lua             R. Ierusalimschy, L. H. de Figueiredo, and W. Celes

HHOOMMEEPPAAGGEE
       http://akfavatar.nongnu.org/

SSEEEE AALLSSOO
       lluuaa(1)   lluuaa--aakkffaavvaattaarr--rreeff(3)   aakkffaavvaattaarr--ggrraapphhiicc(3)  aakkffaavvaattaarr--tteerrmm(3)
       aakkffaavvaattaarr..uuttff88(3)

       http://akfavatar.nongnu.org/manual/
       http://www.lua.org/manual/5.2/



AKFAvatar                         2013-07-11                  lua-akfavatar(1)
