Sign in to follow this  
Followers 0
AlanR

String Comparison - DriveGetType

5 posts in this topic

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

Share this post


Link to post
Share on other sites



Have you tryed showing a message box of what DriveGetType is actually returning?

MsgBox(4096, "", DriveGetType($szDrive))

Share this post


Link to post
Share on other sites

Instead o' dis:

if Not (DriveGetType($szDrive)) = "Fixed" ThenoÝ÷ Û&§yçmiÚÆ®¶­sfbæ÷BG&fTvWEGRb33c·7¤G&fRÒgV÷C´fVBgV÷C²FVà

Silly parentheses. :P


BlueBearrOddly enough, this is what I do for fun.

Share this post


Link to post
Share on other sites

Thanks to all. <> works, as do extra parentheses. Now, I hope the oil works coz I'm obviously pretty rusty! :P

Alan

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0