Hey everyone,
I tried using the following code:
alias ttst {
var %y 0
inc -c %y 1
:s
if (%y < 9) goto s
echo -a done!
}
It SHOULD delay the script (see
/return suggestion), but it doesnt. Possibly a bug, or a feature just not implemented. Either way, I'd like to see it work. :^)
-Zelda4ever
aka "The Big 'Z'"
The problem is in your code to start off with, you need to move the label (s) to before the increment. The code as you have it makes %y = 1, then checks to see if it >9 and then end!
code:
--------------------------------------------------------------------------------
alias ttst {
var %y 0
:s
inc -c %y 1
if (%y < 9) goto s
echo -a done!
}
However, this pause may also delay any other activity in the background. If you search the boards you will see some code that I posted that gives a delay of "n" seconds, which is similar in concept to what you have posted. There are some additional technical comments from others as to why that was or was not a good idea!
Cheers,
DK
(Please excuse typo's as English is my first language!)
Did you even bother to look what the -c switch does.
The -c switch increases %var once per second.
Hey,
Of course I checked! It was an attempt at making a delay (if you clicked the link you shoulda known
) It should just keep looping until the inc -c %y goes to 9. Lets just say it looks good on paper, but not processed.
-Zelda4ever
ala "The Big 'Z'"
Guilty as charged! There goes that old programmers logic again!
(/me thwaps himself with a used trout reading a 60lb Unix manual)
Cheers,
DK