Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QUESTION ABOUT COUNTER

Status
Not open for further replies.

IncredibleVolk

Technical User
Apr 2, 2004
67
US
I have a loop that cycles through the same command 150 times. Is there a way I can increment the number of times the <TAB> key is entered (0x09) for each pass of the loop? In other words, I'd like it to start with 1 tab, then 2 tabs, and so on...

while Counter != 150
termvkey 0x09
pause 2
fetch aspect path pathname
strcat pathname filename2
snapshot FILE Name APPEND
strcat command pathname
run command
pause 3
Counter++
endwhile
 
Something like this should work:

for iTemp = 1 upto Counter
termvkey 0x09
endfor

You'll likely want to use the mspause command in there so it doesn't try to send all of the tabs at the same time.


 
That's not what I actually need. I need to select one-by-one from a list inside a terminal, clear the screen and then do it over again. The problem is that I need to increment the number of times I press the down arrow key (not the <TAB> that I mentioned) I need this all to repeat 150 times, but I need the down arrow to increment each time to ensure that I grab the next item in the list. This is pressing the down arrow 150 straight times. I need 1, loop, 2, loop, etc...


capture on
while Counter != 150
termvkey 0x7A ;F11 key
termvkey 0x0D ;Enter

pause 2
clear
for iCount = 0 upto 150
termvkey 0x28 ;down arrow
pause 1
endfor
termvkey 0x0D ;enter
pause 1
Counter ++
endwhile

capture off
 
Nevermind,

I realized I'm too dumb to understand what you were saying. This worked perfectly. Thanks yet again for your help.

capture on
while Counter != 150
termvkey 0x7A
pause 1
for iCount = 1 upto x
termvkey 0x828
pause 1
endfor
termvkey 0x0D
pause 2
clear
x++
Counter ++
endwhile
capture off
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top