Archive: How to Dynamically form plugin paramers


How to Dynamically form plugin paramers
I want to run a plugin say it MyPlugin. This plugin accepts a number of parameters so it should be called like

MyPlugin::MakeSmthUseful action /PARAM1 param1 /PARAM2 param2

I want to form plugin parameters programmatically so I copy the string "action /PARAM1 param1 /PARAM2 param2" into a variable. Then I need to pass this string (unquoted) to a plugin. How can do I? In case I pass quoted string, plugin assumes it to be the single parameter (i.e. action in terms of code above).

You can use push() to put parameters to stack, installer does the same with command line before plug-in' call. Plug-in uses pop() to read required number of parameters from stack or till the end of stack (or till /END parameter in Inetload).


Thanks, Takhir!