Kaorichan

Check if element exist in loop.

3 posts in this topic

Hello i have that function:

Func atak()
    Global $oFrame = _IEFrameGetCollection($oIE, 1)
    Global $tagas = _IETagNameGetCollection($oFrame,"a")
    For $taga In $tagas
        If @error Then
            Sleep(2500)
        Else
            If StringInStr($taga.id,"npvpattack_") Then
                _IEAction($taga,"click")
                Sleep(Round(Random(100, 165), 2))
            EndIf
        EndIf
    Next
EndFunc

 

So how to check in "For" loop - if element not exist > sleep Else > your code.

Element which i need to check if not exist is "$tagas".

Share this post


Link to post
Share on other sites



maybe try do "for" loop until NOT @error


if @error Then
	MsgBox(262192,"",@ComputerName&" slaps "&@UserName&" around a bit with a large trout!")
	EndIf

>Exit code: 0

REAL search results

"Yeah yeah yeah, patience. How long will that take?"  -Ed Gruberman

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.