AlanR Posted August 22, 2006 Posted August 22, 2006 I'm having problems with the string returned by DriveGetType. The following works: if (DriveGetType($szDrive)) = "CDROM" Then msgbox(4096,"","This works") EndIf but this (which is what I want to use) doesn't: if Not (DriveGetType($szDrive)) = "Fixed" Then msgbox(4096,"","This fails to show") EndIf I've tried all sorts of "fudges", using StringLower() and string variables, but to no avail. For fixed drivs, the DriveGetType() function is certainly returning the string "Fixed", and for other drive types it's also working as advertised. What am I doing wrong here? thanks Alan
Valuater Posted August 22, 2006 Posted August 22, 2006 maybe if (DriveGetType($szDrive)) <> "Fixed" Then msgbox(4096,"","This fails to show") EndIf 8)
Richard Robertson Posted August 22, 2006 Posted August 22, 2006 Have you tryed showing a message box of what DriveGetType is actually returning? MsgBox(4096, "", DriveGetType($szDrive))
bluebearr Posted August 22, 2006 Posted August 22, 2006 Instead o' dis: if Not (DriveGetType($szDrive)) = "Fixed" ThenoÝ÷ Û&§yçmiÚÆ®¶sfbæ÷BG&fTvWEGRb33c·7¤G&fRÒgV÷C´fVBgV÷C²FVà Silly parentheses. BlueBearrOddly enough, this is what I do for fun.
AlanR Posted August 22, 2006 Author Posted August 22, 2006 Thanks to all. <> works, as do extra parentheses. Now, I hope the oil works coz I'm obviously pretty rusty! Alan
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