Jump to content
Sign in to follow this  
13lack13lade

for to loop

Recommended Posts

i have a loop which does the below, now the $count is equal to a cell in excel that has 14 in it.. so i wanted the loop to do it 14 times however it is doing it 15 times.. is that because the first 1 does not count as the 14?

*EDIT* had a play myself appear that, that is the case..  so i will just subtract all values by 1 to counter :) otherwise i could just simply change my code to " 0 to $count "

if $lenclip <=7 Then
   for $b = 1 to $count

      sleep(100)
      send("{TAB 9}")
      sleep(100)
       send("{DELETE 9}")
      sleep(100)
      send($ledger)
   next
else
      for $b = 1 to $count
      sleep(100)
      send("{TAB 8}")
      sleep(100)
       send("{DELETE 9}")
      sleep(100)
      send($ledger)
   Next
EndIf
Edited by 13lack13lade

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