Help - Search - Members - Calendar
Full Version: counting variable
Mp3tag Forums > Mp3tag - International > Development > Export
goyschak
First of all, thank you very much for this great program and this dicussion board.
I really do appreciate the amount of work put in here.

I started to code mtes and my own html page two weeks ago. I started with no knowledge about mte or html and have come a long way since. ;-)

But now I'm stuck.
I would like to generate a html via a mte so that all the album covers are shown in a table, which is 5 columns wide. Therefore I put a counter ("zaehler") into the script, to break the table line (</tr>) as soon as it reaches 5 [line A]. That is working so far. But after that, the counter should be set to 0 [line B], so it can start counting again beginning in the next loop. But as soon as i include line B into the code, the counter ("zaehler") never advances above 1. It just stays there.

Could anybody give me some advice, please?

QUOTE
...
$loop(%_folderpath%)
<td>
...(html code)
$puts(zaehler,$add($get(zaehler),1))
$if($eql($get(zaehler),5),</tr>,) [line A)]
$if($eql($get(zaehler),5),$puts(zaehler,0),) [line B]

$loop(%_filename_ext%)$loopend()$loopend()
...
DetlevD
QUOTE (goyschak @ Feb 17 2009, 14:26) *
First of all, thank you very much for this great program and this dicussion board.
I really do appreciate the amount of work put in here.

I started to code mtes and my own html page two weeks ago. I started with no knowledge about mte or html and have come a long way since. ;-)

But now I'm stuck.
I would like to generate a html via a mte so that all the album covers are shown in a table, which is 5 columns wide. Therefore I put a counter ("zaehler") into the script, to break the table line (</tr>) as soon as it reaches 5 [line A]. That is working so far. But after that, the counter should be set to 0 [line B], so it can start counting again beginning in the next loop. But as soon as i include line B into the code, the counter ("zaehler") never advances above 1. It just stays there.

Could anybody give me some advice, please?

Two things:
1.
Maybe a closing round bracket is too much.
$if($eql($get(zaehler),5),</tr>,) [line A)]

2.
$put() and $puts() cannot be used as an argument within Mp3tag functions.
You have to recode the line, e. g.
$puts(zaehler,$if($eql($get(zaehler),5),0,$get(zaehler))

DD.20090217.1512.CET
goyschak
QUOTE (DetlevD @ Feb 17 2009, 15:14) *
Two things:
1.
Maybe a closing round bracket is too much.
$if($eql($get(zaehler),5),</tr>,) [line A)]

The part between the [] isn't in the code. The ")" was a mistype. ;-)

QUOTE (DetlevD @ Feb 17 2009, 15:14) *
2.
$put() and $puts() cannot be used as an argument within Mp3tag functions.
You have to recode the line, e. g.
$puts(zaehler,$if($eql($get(zaehler),5),0,$get(zaehler))


$puts(zaehler,$if($eql($get(zaehler),5),0,$get(zaehler))) ;-)
Thank you very much! That did the job!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.