Hi.

--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
> It seems to work if you omit the script path save and use (one line)
> local hHan = dll.monitored_msg(WM_DEVICECHANGE, cb
> (scriptfolder++"/"++scriptname++"@onDevice", "\x04", "\x05"))

I always use a function for this:

function _cb(funct, arg1, arg2)
quit(cb(scriptfolder ++ ?"\" ++ scriptname ++ "@" ++ funct, arg1, arg2))

Makes it:
local hHan = dll.monitored_msg(WM_DEVICECHANGE, _cb
("onDevice", "\x04", "\x05"))
then. A bit shorter...

Mockey


Reply via email to