Aspect has both for-loops and while-loops that you can use
to repeat an operation a set number of times.
Here's an example of how you could change KEY 0 on
all sets in loop 3, 4 and 5
Code:
;Changes all 3903 sets in spesified loops and units.
proc main
string loopunittxt
integer loopnr, unitnr
; Turn on Capture so we have a record of what we'v done.
capture on
; Lets make sure were in the right load.
transmit "****"
pause 2
transmit "LD 20^M"
waitfor "REQ: "
for loopnr=3 upto 5 ; loop 3 - 4 and 5
for unitnr=0 upto 15 ; unit 0 to 15
transmit "chg^M"
waitfor "TYPE: "
transmit "3903^M"
waitfor "TN "
strfmt loopunittxt "%d %d^M" loopnr unitnr
transmit loopunittxt
waitfor "ECHG "
transmit "yes^M"
waitfor "ITEM "
transmit "key 0 nul^M"
waitfor " KEY "
transmit "^M"
waitfor "ITEM "
transmit "^M"
waitfor "REQ: "
endfor
endfor
; Turn Capture off.
capture off
endproc
(typed, not tested as I'm not on a Windows-maschine right now)
Check the Procomm buildt-in help function and the
PDF-files on the install-CD for details and examples
on how to use Aspects many commands.
There are lots of commands in Aspect, and you can build quite advanced scripts with them when you learn how to use them.
Procomm can even read the TN-pos from an excel-sheet,
and write e.g. the new DN back into that same sheet.
HTH
