SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why is my loop not incrementin

    I have a list of links I want to click except for 3 that are embedded in the middle of the list. So I get this count from a popupList which has all the links I want and the 3 I don't. I take this count make a loop asking if a certain string exists in the link, then click it. If not increment my loop by 1. But I cannot seem to get my loop to increment by one. But the variable increments by one when it needs to, The variable i stops at 19 but the print statement says iFrysCats goes to 22. Is there a reason why it is not recognizing the increment?
    By the way I put in the line of code:
    iFrysCats = iFrysCats + 3 to make it work.
    I am guessing it is not incrementing due to the line above it tell it to getitemcount?

    [ ] INTEGER i
    [ ] INTEGER iFrysCats
    [ ] iFrysCats = BrowserPage.HtmlPopupList("#1").GetItemCount ()
    [ ] ResOpenList ("Locations/Department")
    [ ] iFrysCats = iFrysCats + 3
    [-] for i = 2 to iFrysCats
    [ ] Print ("This is i {i}")
    [ ] Print ("This is iFrysCats {iFrysCats}")
    [ ] INTEGER iCount = -1
    [ ] STRING sTest = "deptid"
    [ ] STRING sMyString
    [ ] sMyString = BrowserPage.HtmlLink ("#{i}").GetLocation()
    [-] if (StrPos(sTest, sMyString) !=0)
    [ ] Print ("{iCount + i}""{BrowserPage.HtmlLink ("#{i}").GetText ()}")
    [ ] BrowserPage.HtmlLink ("#{i}").Click ()
    [ ] Browser.Back.Click()
    [-] else
    [ ] iFrysCats = iFrysCats + 1
    [ ] ResCloseList ()


    [This message has been edited by crazyram (edited 01-15-2001).]

  2. #2
    Junior Member
    Join Date
    Dec 1999
    Location
    Allendale, NJ, US
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: why is my loop not incrementin

    The i in your for loop gets incremented each time you go through the loop. iFrysCats is the number it loops up to. You probably shouldn't change iFrysCats or it won't loop through the whole list.


    [This message has been edited by wambrose (edited 01-15-2001).]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:24 AM.

Copyright BetaSoft Inc.