BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 eXtreme Movie Manager (Rel. 7), No More Updates
 Scripts
 I have a few questions about how scripts work....
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

FreaKBrother
New Member

97 Posts

Posted - 09 Aug 2004 :  16:46:39  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a few questions about how the scripts work.
1) Does the "Script Engine" always execute the functions in the same order? It seems like it does it in this order, is this correct?
#RIGHTPAGEFOUND#
#CREATEMOVIELIST#
#MOVIETITLE#
#DIRECTOR#
#ACTORS#
#GENRE#
#SUBGENRE#
#RATING#
#COMMENTS#
#PLOT#
#RUNTIME#
#COUNTRY#
#YEAR#
#LANGUAGE#
#TAGLINE#
#MOVIEID#
#POSTER#
#PRODUCER#
#WRITER#
#REGION#
#EDITION#
#SCREENDVD#
#AUDIODVD#
#PHOTOGRAPHER#
#STUDIO#
#MPAA#
#MUSIC#
#DISTRIBUTOR#
#OFFICIALWEB#
#UPC#
#AWARDS#

2) Is it possible for me to specify in what order the functions are executed?
I'm writing a new script for iMDB and I would like to execute these in a row since they appear on the same page:
#DIRECTOR#, #ACTORS#, #PRODUCER#, #WRITER#, #PHOTOGRAPHER#, #MUSIC#, #DISTRIBUTOR#

I know I can use the #OPENNEWWEB# - #RESTOREWEB# and that it doesn't download the whole page every time but it takes it from the cache instead. The problem with using that is that it screws up the download statistics (since it counts the page every time even though it takes it from the cache), every time you use the #OPENNEWWEB# function it halts the script for a moment = would be faster if I didn't have to use that.

3) If there's only one movie found can I somehow in the script pass the "web link" to the script engine and tell it to use that like a "direct hit".
For example I've tried using this #WEBQUERY# string:
#WEBQUERY#http://akas.imdb.com/List?tv=off&&page=/Details&&words=#MOVIE#
The reason is because that makes the links point to the "Combined Details" page instead of "Main Details" which holds more information than "Main Details".
The problem is that it never goes directly to the found page even though there's only one movie found
Try these searches and you'll know what I mean:
http://akas.imdb.com/List?tv=off&&page=/Details&&words=Eighteenth%20Angel
http://akas.imdb.com/List?tv=off&&page=/Details&&words=shipping%20news
Or does anybody know another search string that open the "Combined Details" instead of the "Main Details" page?
I made a script that used this string:
#WEBQUERY#http://akas.imdb.com/M/title-substring?title=#MOVIE#&tv=off
and then I manipulated the links to point to the "Combined Details" but if there is a "direct hit" it ends up on the "Main Details" so that didn't work
Can I change the "web link" with the script to change the page from:
http://akas.imdb.com/title/tt0120824
http://akas.imdb.com/Details?0120824
(I wonder if anybody understands what I meant in this last one )

Thanks in advance

Edited by - FreaKBrother on 09 Aug 2004 16:58:17

Jon
Starting Member

USA
8 Posts

Posted - 15 Aug 2004 :  08:26:21  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi FB,

Here are some answers as I understand them.

1) Sure you could in theory assume that these sections will appear in a particualar order (and just realize that some sections may be turned off by the user). This is of course not that great of a design, since later if the order that they are evaluated changes, your script will break.

2) If you want you can right at the beginning read all the values that you want into variables, then in each block, just return the variable that you have stored the result it. So, instead of reading the director all by itself, you would read it in in some earlier section...however you must realize that that section (say #TITLE#) may be turned off byt the user, so you would have to take that into account.

3) There are 2 points, are you sure that the 1 "direct hit" is really the right movie?

But mostly...There is already a mode WWW/Engine Configuration/QUICK Import that handles the case that you are talking about, and allows the user to choose if he wants to check the single result or just take it, and have it automatically chosen. In other words if you build a title list, and it only has one entry, the engine will assume that the one entry is correct, and it will process it as if the user chose it himself

Go to Top of Page

FreaKBrother
New Member

97 Posts

Posted - 17 Aug 2004 :  20:54:59  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry, I somehow missed that somebody replied to this post

1) You're right.

2) I guess that I could make the same code in all those sections and then have the script check the variable before it runs and if the variable that should hold for example the actors isn't 0 then it is already taken and it should just save the variable. And if it's 0 it should run like "normal".
I guess that would work, but if the user doesn't want to take all information then it will result in a slower script

3) The search string I used never opened up the webpage automaticly for a movie that was found. I used the "Power Search" http://us.imdb.com/list I guess the people at iMDB coded the Power Search to behave that way.
But I gave up on using that search string since I couldn't make it open a hit automaticly when there was a "direct hit".

You're right I forgot that you could set that option to take it if there was only one movie found that's a much better option then to decide it in the script

Edited by - FreaKBrother on 17 Aug 2004 21:05:45
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.13 sec. Powered By: Snitz Forums 2000 Version 3.4.07