Placeholder that can count inside "if" function


#1

I can't get counter value inside of "if" function.
So I was wondering is it posible to write placeholder that can count (like %_counter%) inside "if" function.

Example:
$loop(%_folderpath%)

$if($eql($folderdepth(%_folderpath%),$folderdepth(%_workingpath%)),,%_counter_if%)

$loopend

Please reply Florian, thanks
~ milka


[X] '$put or $puts in $if' bug
#2

What exactly are you trying to achieve?


#3

Already possible:

$loop(%_folderpath%)$puts(cnt,$if($eql($folderdepth(%_folderpath%),$folderdepth(%_workingpath%)),$get(cnt),$add($get(cnt),1)))
$loopend()
$get(cnt)

#4

Thanks dano, but I dont think that thats it.
I dont wont to get max counter, I just wont to count inside "if" function.

I will test it when I came home.

What is "$get(cnt)"?

~ milka


#5

cnt is a user defined variable that I declared with $puts (see scripting help file)

And please write want.


#6

Sorry. :blush: My english is bad.

You don't have to bother with this, because it's hard to do or even impossible.
I was just trying to help to HankD.

~ milka


#7

I make it, thanks again dano.
I just nedded to put $get(cnt) inside of loop.

$loop(%_folderpath%)$puts(cnt,$if($eql($folderdepth(%_folderpath%),$folderdepth(%_workingpath%)),$get(cnt),$add($get(cnt),1)))
$get(cnt)
$loopend()

Best regards,
~ milka