Jump to content
Kaorichan

Check if element exist in loop.

Recommended Posts

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

As indicated in the other closed thread: Please read our forum rules before continuing in our forums.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

×
×
  • Create New...