Page 1 of 1
How to merge two scripts (or how to run two scripts simultan
Posted: 2014-12-14 03:48:23
by nealtobe
Hi... I wanna know if there is the possibility to merge two scripts. Right now I am getting the information of my movies from internet, specifically usign the IMDb script and the IMDB (Actors images) script. But the problem I have is that I'm being running both scripts separetely, and that doubles the time for getting all the information (I have to write the name twice, select from the list twice, etc). Somebody has an idea?
Thanks in advance...
Posted: 2014-12-15 13:54:05
by antp
It is possible, but not automatically. The required changes are probably not very big: you have to include into one file the global variables and functions from the other, possibly the options list, and then merge the contents of the two main programs (i.e. the last "begin...end." block, the one that's not inside a function).
In your case, as it concerns two scripts sharing the same search (both getting information from IMDb) you can even do simpler: you have to copy the function AnalyzeMoviePage under another name (e.g. AnalyzeMoviePage2
), add a call to it after the call to the first AnalyzeMoviePage, copy the few GetActor-something functions and the few options that do not yet exist in the main IMDb script.
All that is supposing that the scripts are close enough and have similar code for the title search part (I suppose it is the case).