Sign in to follow this  
Followers 0
Arclite86

Do..Untill

14 posts in this topic

this is what i have:

Local $i = _GUICtrlListBox_GetCount($list1)
  GUICtrlSetData($Edit15,$i)

  Do
Call ("scanner")
Until $i

$i counts the number of names in $list1

than I want to repeat the "scanner" function until $i (counted names in $list1)

but it doesnt work, can sombody  help me.

Share this post


Link to post
Share on other sites



Do you want to call the function $i times, or do you want to call it until it returns the same as $i?

Share this post


Link to post
Share on other sites

Do you want to call the function $i times, or do you want to call it until it returns the same as $i?

I want to call the function $i times,

 

Show func scanner

this is the function:

Func scanner()

    $link = GUICtrlRead($list1)

$oIe  =_IECreate("https://twitter.com/"&$link,0,0,1,1)
_IENavigate($oIe, "https://twitter.com/" &$link)

$oIe = _IEAttach("Twitter")

If @error = $_IEStatus_NoMatch Then
    ConsoleWrite("tab niet gevonden" & @CRLF)
    Exit
EndIf

$oLinks = _IELinkGetCollection($oIe)

If @error = $_IEStatus_Success Then
    $linkCnt = @extended
    ConsoleWrite("Link count = " & $linkCnt & @CRLF)

    For $oLink In $oLinks
        If $oLink.className = 'js-nav' Then
            If $oLink.getAttribute('data-nav') = 'followers' Then
                                            $4er =  _GUICtrlListBox_GetCurSel($List2)
 _GUICtrlListBox_ReplaceString($List2, $4er, ""& $oLink.innerText)
                ConsoleWrite('Followers = ' & $oLink.innerText & @CRLF)


    ;_GUICtrlListBox_AddString ($list2,""& $oLink.innerText)
            ;   $4GG =  _GUICtrlListBox_GetCurSel($List2)
;_GUICtrlListBox_ReplaceString($List2, $4GG, ""& $oLink.innerText)


$text = _GUICtrlListBox_GetCurSel($List2)
_GUICtrlListBox_ReplaceString($List2,$text,""& $oLink.innerText)

            EndIf
        EndIf
    Next
EndIf




$oLinks2 = _IELinkGetCollection($oIe)
    For $oLink2 In $oLinks2
        If $oLink2.className = 'js-nav' Then
            If $oLink2.getAttribute('data-nav') = 'following' Then
                ConsoleWrite('following = ' & $oLink2.innerText & @CRLF)
                                            $4er =  _GUICtrlListBox_GetCurSel($List3)

;_GUICtrlListBox_AddString ($list3,""& $oLink2.innerText)
;                           $4er =  _GUICtrlListBox_GetCurSel($List3)
 ;_GUICtrlListBox_ReplaceString($List3, $4er, ""& $oLink2.innerText)


$text =  _GUICtrlListBox_GetCurSel($List3)
_GUICtrlListBox_ReplaceString($List3,$text,""& $oLink2.innerText)

            EndIf
        EndIf
    Next



            $iIndex += 1
            If $iIndex = _GUICtrlListBox_GetCount($List1) Then $iIndex = 0
            _GUICtrlListBox_SetCurSel($List1, $iIndex)

            If $iIndex = _GUICtrlListBox_GetCount($List2) Then $iIndex = 0
            _GUICtrlListBox_SetCurSel($List2, $iIndex)

                        If $iIndex = _GUICtrlListBox_GetCount($List3) Then $iIndex = 0
            _GUICtrlListBox_SetCurSel($List3, $iIndex)


            If $iIndex = _GUICtrlListBox_GetCount($List4) Then $iIndex = 0
            _GUICtrlListBox_SetCurSel($List4, $iIndex)




            If $iIndex = _GUICtrlListBox_GetCount($List5) Then $iIndex = 0
            _GUICtrlListBox_SetCurSel($List5, $iIndex)
_IEQuit ($oIe)
EndFunc

Share this post


Link to post
Share on other sites
For $idx=1 To $i
    scanner()
Next

No need for Call.

Thank you too :)

Share this post


Link to post
Share on other sites

does somebody know how to read a few line from a text file and than sum them up

something like line1 + line2 + line3 etc.. =..

Share this post


Link to post
Share on other sites

you can add strings with &...

Share this post


Link to post
Share on other sites

no sorry that not what i meant

in the list a have a few lines with numbers, like:  line1=787 line2=388 line3= 482  but  how sum them up?

Share this post


Link to post
Share on other sites

The '+' should work

Share this post


Link to post
Share on other sites

The '+' should work

but how can i write it as a good function

do I have to use: line1+line2+line3 etc, i have about 40 lines and the list grows daily 

I know i have to do something with

Local $i = _GUICtrlListBox_GetCount($list1)
GUICtrlSetData($Edit15,$i)

to read the lines in total of a list, but thats all,..

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  
Followers 0