Jump to content
Sign in to follow this  

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
$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

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

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

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

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

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

If $Ignore > 0 Then $Found = 0


Share this post

Link to post
Share on other sites

btw, you would have the same issue with for...next and do..until. Same type error would come up.

AutoIt3, the MACGYVER Pocket Knife for computers.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...