mary Posted February 7, 2007 Posted February 7, 2007 hi ! is there a way to detect this event :(i.e: pen drive introducing) ? both win 2000 and xp thiks
BrettF Posted February 7, 2007 Posted February 7, 2007 (edited) hi ! is there a way to detect this event :(i.e: pen drive introducing) ? both win 2000 and xp thiks Maybe: $var = DriveGetDrive("REMOVABLE") While 1 Select Case Not $var[0] = DriveGetDrive("REMOVABLE") MsgBox(0, "Drive", "A removeable drive was inserted.") Case Else EndSelect WEnd Edit: Woah! What im i on... Edited code. UNTESTED!! Edited February 7, 2007 by bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
mary Posted February 7, 2007 Author Posted February 7, 2007 thinks ! i'll try this function. maybe there is other way (registry event, process lanch, or other plugins events)
Helge Posted February 7, 2007 Posted February 7, 2007 I played a bit with GUIRegisterMsg and some message I can't remember the name of at the moment...maybe WM_DEVICECHANGE. It worked for me, but I'm pretty certain it also fires on other events as well, so try googling it a bit and I'm sure you'll find something interesting concerning pen-drives.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now