bird42 Posted January 22, 2009 Share Posted January 22, 2009 i want to make a script which detects i f a drive is plugged in... can u help me? Link to comment Share on other sites More sharing options...
Inverted Posted January 22, 2009 Share Posted January 22, 2009 ?? There is a whole family of drive-related functions. Read the help ? Especially DriveStatus seems suited to your needs. Link to comment Share on other sites More sharing options...
bird42 Posted January 22, 2009 Author Share Posted January 22, 2009 i alredy know drive related functions but i don't want to write a loop such this: while 1 $var = DriveGetDrive( "REMOVABLE" ) For $i = 1 to $var[0] ;do something next EndSelect WEnd i need a script like this repeat sleep(100) until a usb is plugged Link to comment Share on other sites More sharing options...
Authenticity Posted January 22, 2009 Share Posted January 22, 2009 (edited) From G. Born's press ; Drive type constants Const Global Unknown = 0 Const Global Removable = 1 ; Removable medium Const Global Fixed = 2 ; Fixed medium (hard disk) Const Global Remote = 3 ;Network drive Const Global CDROM = 4 ; CD-ROM Const Global RAMDisk = 5 ; RAM disk Dim $fso, $oDrive, $Drive $fso = ObjGet("Scripting.FileSystemObject") $oDrive = $fso.Drives For $Drive In $oDrive Switch $Drive.DriveType Case Unknown ..... Case Fixed ..... EndSwitch Next ;... by G. Born Edited January 22, 2009 by Authenticity Link to comment Share on other sites More sharing options...
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