lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 09/06/2011 10.45, steve donovan wrote:
Hi all,


[snip]

Ok, I couldn't resist delving a bit deeper in the docs! :-)

Some suggestions (see docs for MS-WinAPI MessageBoxEx function):

- function show_message(caption, msg)

Add a third optional string parameter allowing the user to select the kind of msgbox to show: "info" (default), "warning", "error" or "question".

Add a fourth optional (string? table?) parameter indicating the buttons to be shown to the user: "ok" (default), "yesno", "okcancel", etc.

Add a string return value indicating how the user dismissed the dialog:
"cancel", "ok"

Another useful additional parameter would be a timeout value, after which the box would be dismissed returning a special value "timedout", but I suspect this couldn't be a quick and easy thing to do.

If these seems too high level, a toned-down approach could simply add a third optional table parameter with a list of flags which will be OR-ed toghether (of course the flags, such as MB_ICONQUESTION, should be added to the constants list of "winapi").



- class Process

Add a method path() to return the actual process path in the file system. I don't know if this is easy to do (maybe not, since autoit doesn't have it), but it could be possible since Sysinternals' "ProcessExplorer" shows it.

The need for that feature for me arises when trying to tell apart concurrently running processes with the same name (say two different lua.exe processes created running two different versions of the interpreter, lying in two different dirs).