Table of Contents
- MagicScript Technology
- Programmer's Guide
- Scripts
- dvd-palace.de
- Beyazperde
- Templates
- Collected Feature Requests
- Collected Skript Requests
MagicScript Technology Programmer's Guide
Copyright
- (C) 2001-2010 BinaryWorks.it
- Web : http://www.binaryworks.it/
- E-Mail : alessioviti@binaryworks.it
- Documentation Version [4.6]
Contents |
Disclaimer
The author is in no way responsible for any damage, loss or costs that the installation or use of this program (or attempted installation or use) may cause you or your equipment. Installation and use of this program is entirely at your own risk. This program comes with no guarantees and is provided on an 'as is' basis. The author makes no guarantees on its soundness, reliability or suitability for any given purpose.
This program is Freeware. You may distribute this program freely but you must request permission and include the full unmodified setup package including all program files and documentation. If you wish to distribute this program commercially, you must request permission from the author.
What Is MagicScript
MagicScript Technology is the new way to import information about your favourite movies from the web. In its past version, eXtreme Movie Manager allowed you to import information from two important websites only: imdb.com & dvdempire.com. With this new version, you can, in theory, import information from all the websites you want!
How To Use MagicScript
MagicScript is a mini programming language that will allow you to write code to obtain information from a HTML page. For this purpose, you can use IF and REPEAT-WHILE statements, and many others. Of course, this language isn't as powerful as other complete languages like Basic etc., but it is sufficiently powerful for eXtreme Movie Manager's goals.
A Script won't be simple to build if you don't know any other programming languages. In this case you can use the Ready-Made Scripts available on my web page.
Script Structure
A Script is a normal TXT file composed of INSTRUCTIONS, BLOCKS and STATEMENTS that you can edit with any editor.
Every Script file is associated with one movie site, so there will be a Script file for IMDb, another one for dvdempire, etc...
The structure of the text is free. This means that you can add notes and comments where you want, because all keywords are written inside sharps, like this : #IF#
The basic structure that must be present in every Script is formed by the keyword #WEBQUERY# and the Block #RIGHTPAGEFOUND#. We will discuss their functions in detail later.
A Script consists of a series of BLOCKS. Functions & Instruction inside Blocks are executed sequentially until the end of every BLOCK is reached.
When you want to import information, MagicScript opens the Script of the Web site you want and proceeds to gathering information as described in the Script. Of course, a script written for IMDb will not work in the dvdempire.com site, and you will probably have an unpredictable end of program.
As I have said, the Keyword #WEBQUERY# must be contained in every script to question the DB of a movie website. The BLOCK #RIGHTPAGEFOUND# is vital too. It can check if you have found what you are looking for. All other blocks are optional. For example, if the information retrieved from IMDb is satisfactory to you, but you want all the BoxCover from dvdempire.com, you can write a Full Script for IMDb and a little script for dvdempire with only the BLOCK to take the images : #POSTER#...#ENDPOSTER# Of course there is another way to do it : you can simply check the Cover Option in eXtreme Movie Manager Import Config and you will take only that.
Why Block Structure?
For every item of information imported there is a special Block. This is because if a user wants to import only a particular item, he can uncheck all the others directly inside the software, without modify the script. For example, to take the TITLE of a movie, you should write all of the instructions inside this Block:
#MOVIETITLE# ...... ...... #TITLE#=#03# #ONERROR#=*ASK* #ENDMOVIETITLE#
Of couse, you can also use only one Block ( #MOVIETITLE# in this case) to write ALL the instructions for gathering all information, but your script will be less configurable by users.
First, Second and Third Script Generation
From eXtreme Movie Manager 1.0 to 4.8, the engine can handle two different types of Scripts : the OLD, also known as First Generation, and the Latest, or Second Generation. The instructions and functions are the same for both ( 2. has some new ), but the difference is the HTML. When the engine detects a First Generation script, the HTML is "pre-processed". This means that the HTML is rewritten in more lines, how it is if you edit with a normal text editor. The Second Generation doesn't pre-process the HTML (so the speed is increased), but the HTML in most cases is contained in only one line. This means that a Second Generation script cannot work with Divxmanager 0.9, because the HTML is always pre-processed.
Divxmanager 1.0 can work with both 1. and 2. because it can "read" the generation with this line :
#SCRIPTGENERATION#=2
The 2. also has another Header variable : #REPLACESPACES#= This tells the engine what characters must be used to replace spaces in the movie title when querying the Web sites. This is indispensable for sites like ALLOCINE.FR (or the movie will not be found).
From eXtreme Movie Manager 5.0, the engine can handle only Third Generation Scripts. The instructions and functions are the same as Second Generation, but there are several new ones to import TV series and to parse the HTML better . In the Third Generation, the HTML is "pre-processed" (like Generation 1), because it is easier and quicker to make scripts in this way.
The most uptodate Script Generation is 5 (five!).