dcop Posted June 17, 2007 Share Posted June 17, 2007 Dim $strInStrArray[10] = ["Dir(s)","File(s)","<DIR>","Volume in drive","Volume Serial","Total Files Listed","Directory of"] If StringInStr($a, $strInStrArray[0]) <> 0 Then $a = "" ElseIf StringInStr($a, $strInStrArray[1]) <> 0 Then $a = "" ElseIf StringInStr($a, $strInStrArray[2]) <> 0 Then $a = "" ElseIf StringInStr($a, $strInStrArray[3]) <> 0 Then $a = "" ElseIf StringInStr($a, $strInStrArray[4]) <> 0 Then $a = "" ElseIf StringInStr($a, $strInStrArray[5]) <> 0 Then $a = "" ElseIf StringInStr($a, $strInStrArray[6]) <> 0 Then $a = "" EndIf I would like to accomplish skinnying down to 1 'If' but am not able to figue out how to 'Or' If StringInStr($a, $strInStrArray[0 or 1 or 2 or 3....and so on]) <> 0 Then TIA, Dennis Link to comment Share on other sites More sharing options...
Siao Posted June 17, 2007 Share Posted June 17, 2007 (edited) FOR $e IN $strInStrArray If $e <> "" Then $a = "" NEXT ? Edited June 17, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
dcop Posted June 17, 2007 Author Share Posted June 17, 2007 Dang! Nice, thanx! Never even knew that one exists. 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