Inserting a "page break" into the text I want into

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
curna

Inserting a "page break" into the text I want into

Post by curna »

Hi, first of all congratulations for this program. It's the best I've found to catalog movies.

Here we go. I wanted the script to copy also the characters in the film, so I changed the script.

The resulting script is:

// Actors
LineNr := FindLine('Cast overview', Page, 0);
if LineNr = -1 then
LineNr := FindLine('cast overview', Page, 0);
if LineNr = -1 then
LineNr := FindLine('Complete credited cast', Page, 0);
if LineNr > -1 then
begin
FullValue := '';
repeat
LineNr := LineNr + 1;
Line := Page.GetString(LineNr);
if pos('<TD VALIGN="TOP">', Line) > 0 then
begin
Line := copy(Line, 25, Length(Line));
BeginPos := pos('">', Line) + 2 ;
EndPos := pos('</TR>', Line);
Value := copy(Line, BeginPos, EndPos - BeginPos);
HTMLRemoveTags(Value);
HTMLDecode(Value);
if (Value <> '(more)') and (Value <> '') then
begin
if FullValue <> '' then
FullValue := FullValue + ', ';
FullValue := FullValue + Value;
end;
end else
begin
Line := '';
end;
until Line = '';
HTMLDecode(FullValue);
SetField(fieldActors, FullValue);
end;
My problem is with this line:

FullValue := FullValue + ', ';

I want each actor + character to be displayed in another row, so I should insert a page break. However, I don't know how to do it.

Thanks for any help. Curna
Curna

Answer

Post by Curna »

Well, you see, I've found the answer in one of the scripts that come with the program.


FullValue := FullValue + #13#10;

Thta's the answer.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Yes, that's right ;)
Twink
Posts: 92
Joined: 2002-08-01 01:40:12

Post by Twink »

does this one need updating now due the imdb change?
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Yes, but I do not remember exactly what it does
Isn't it included already in the IMDB script that comes with the program ?
Twink
Posts: 92
Joined: 2002-08-01 01:40:12

Post by Twink »

it displays the actors like actorname (as character)
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

the current IMDB script already does it already
Post Reply