Nice idea. Something I could use. See script just posted (deviceDetect.powerpro)
--- In [email protected], "mockey_a" <[EMAIL PROTECTED]> wrote: > --- In [email protected], "prema_arnava" <yoyo@> wrote: > > Is there another way? Because I want to fire some script after any > > drive was plugged in, not only my own. > > You could use the dll-plugin to monitor the WM_DEVICECHANGE-message(s): > > Something like that: > > local WM_DEVICECHANGE = 0x0219 > dll.monitored_msg(WM_DEVICECHANGE, ?`win.debug("device changed!")`) > > Also see here: > http://msdn2.microsoft.com/en-us/library/aa363480.aspx > > It should be possible to determine DBT_DEVICEARRIVAL, also drive-type, > etc. > > Mockey >
