next up previous contents
Next: Sample Up: luacom_detectAutomation Previous: Prototype   Contents

Description

This function gets from the top of the Lua stack a table which should hold two fields named ``StartAutomation'' and ``Register'' (these fields should contain functions that implement these actions). Then it searches the command line (provided argc and argv) for the switches ``/Automation'' or ``/Register''. If one of these switches is found, it then calls the corresponding function in the Lua table. Finally it returns a value telling what happened, so the caller function may change its course of action (if needed). This function is simply a helper for those implementing Automation servers using LuaCOM. Most of the work should be done by the Lua code, using the functions luacom_RegisterObject, luacom_NewObject, and luacom_ExposeObject.

Vinicius da Silva Almendra 2003-06-04