hi all, how would I get the text from the commandline?
Heres how to do it in C, but I need to do it in lua.
thanks
Code:strncpy(szText, lpCmdLine, MAX_CHARS - 1);
Professional Software Development Tools
hi all, how would I get the text from the commandline?
Heres how to do it in C, but I need to do it in lua.
thanks
Code:strncpy(szText, lpCmdLine, MAX_CHARS - 1);
there is a default variable that defines the commandline arguments
example usage_CommandLineArgs
A numerically indexed table that contains the command line arguments passed into the AutoPlay application.
Code:if _CommandLineArgs then local CountArgs=Table.Count(_CommandLineArgs) Dialog.Message("CommandLineArgs", CountArgs.." arguments were passed to the exe); end
Last edited by RizlaUK; 07-08-2008 at 07:54 AM.
Open your eyes to Narcissism, Don't let her destroy your life!!
Thanks Riz, I have never worked with commandline before and I am a little confused.
Have you seen my post in the dev den? I really need to get the same functionality in Lua.
if you could have a look and let me know your thoughts it would be greatly appreciated.
thanks
orCode:if _CommandLineArgs then if _CommandLineArgs[1] then Dialog.Message("Test", "Argument one:\r\n".._CommandLineArgs[1]) end --andsoforth end
Code:if _CommandLineArgs then for i, ArgString in _CommandLineArgs do ListBox.AddItem("ListBoxObject", ArgString, "Data"); end end![]()