I'm trying to make a script for new filmweb.pl, and I got a problem...
To get the plot of a movie, I have to find the last occurence of '<li>', so I try to do "findline" until it will return 0... But the Findline returns 0 just when it tries to find second occurence... And of course doesn't search no more...
Here's what I've got:
(It's of course WorkInProgress, so It won't work well, and the "628" is
just an example :)
--PLOT--------------------------------------------------------------------------------------
#PLOT#
#STRING#=#07#=http://filmweb.pl/FilmDescriptions?id=628
#OPENNEWWEB#=#07#
#FINDLINE#=<li>#01# #ONERROR#=*OK*
#IF# #01#==#02#
#GOTO#=NOPLOT
#ENDIF#
#REPEAT#
#FIND#=<li>#03# #ONERROR#=*STOP*
#FINDLINE#=<li>#01# #ONERROR#=*OK*
#WHILE# #01#<>#02#
#FIND#=>#03# #ONERROR#=*STOP*
#FIND#=</li#04# #ONERROR#=*STOP*
#TAKEWORD#=#44#,#03#,#04#
#TAKEPLOT#=#44#
:NOPLOT
#RESTOREWEB#
#ENDPLOT#
For me, it works like this:
It goes through the #repeat# only once, and then, just after first #find# it finishes the plot and goes to runtime, if I remember correctly, and there's nothing, that I can do about it... I rewrote it several times from the beginning, and there's always the same...
The second problem is that... how to put the value of #03# into #CURSOR#, so it would search the last known occurence again?
I reckon it would be sthg like this:
#PUTCURSOR#=#03#
...
#SETCURSOR#=#SHOWVAR#=#03#
[\code]
but who knows how the "showvar" works...