Change the number of actors

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
Guest

Change the number of actors

Post by Guest »

Can you modify the part of IMDB script were the actors part is so you only get the first 3 or 5 actors for the movie instead of all the actors?
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

It should be possible
If do not have time right now to do it, but basically you just have to add a counter in the repeat...until loop of the Actors part.
If you can't do it and nobody else did it until I have time (maybe this evening) I'll do it.
Bearclaw

Post by Bearclaw »

Im sorry but I can't do it tried
But thanks for the quick response though
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Since I do not know which one of the three IMDB scripts you want to modify, I'll explain the changes to do :

1.
Locate the line « LineNr: Integer; » thats not far from « procedure AnalyzeMoviePage »
Change it to « LineNr, nActors: Integer; »

2.
Locate the line « // Actors ». Few line bellow, you'll find a line containing « repeat ». Above this line insert the line « nActors := 0; »

3.
About 20-25 lines bellow, find « FullValue := FullValue + Value; »
Under this line insert a new line with « nActors := nActors + 1; »

4.
Few lines bellow, find « until Line = ''; » and replace it with « until (Line = '') or (nActors >= 5); »

It should work fine now (you can replace the 5 by a 3 if you only want the three first actors ;))
Bearclaw

Post by Bearclaw »

Thanks alot it worked out great
Post Reply