Jump to content

Problems With For...next And While...wend


Recommended Posts

I've got a problem. My For... doesn't work anymore.

I replaced the For... with While...WEnd.

It says:

Error: "Wend" statement with no matching "While" statement

The same thing with For....

Can someone look:

Func SearchAND($ReadLine)
$FoundNum = 0

;======Start MultiWords
If $MultiWords = "Yes" Then

;=====Start searching each word
$num = 1

While $i <= $Words[0]
;=====Check match
$Found = StringInStr($ReadLine, $Words[$num])

If $Ignore[0] > 0 Then
$num = $Ignore[0] + 1

$Ignore[$num] = StringInStr($ReadLine, "Temporary Internet Files")

$exc = 1
Do
$Ignore = StringInStr($ReadLine, $Ignore[$exc])
;=======Ignore certain words
If $Ignore > 0 Then $Found = 0
$exc = $exc + 1
Until $exc = $Ignore[0]

If $Found > 0 Then
$FoundNum = $FoundNum + 1
EndIf

;========End searching for words
$i = $i + 1
WEnd

If $FoundNum = $Words[0] Then
$Found = 1
$FoundSomething = "yes"
Else
$Found = 0
EndIf

;=======If not MultiWords.........
Else

;=====Check match
$Found = StringInStr($ReadLine, $Words)

$Ignore = StringInStr($ReadLine, "Temporary Internet Files")

If $Ignore > 0 Then $Found = 0

EndIf
EndFunc
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...