PROGRAMMER'S GUIDE

MagicScript Technology

Programmer's Guide

    (C) 2001-2003 BinaryWorks.it
   
Web : http://www.binaryworks.it/
    E-Mail : alessioviti@binaryworks.it
    Documentation Version [2.0]


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 Technology is the new way to import information of your favourites movies from the web . In its past version, eXtreme Movie Manager allowed you to import Info from two important web-sites only: imdb.com & dvdempire.com.
With This new version, you can in theory import information from all the web-sites you want!

Top

How To Use

MagicScript is a mini programmer-language that will allow you to make oriented-code to obtain information from a HTML page.
For this purpose, you can use the IF , REPEAT-WHILE statements and many others. Of course, this language isn't as powerful as other complete languages like Basic etc.. but it is sufficient for eXtreme Movie Manager Goals.

The Script won't be simple to build if you don't know any other prog-languages.In this case you can use the Ready-Scripts available on my web page.

Script Structure

The Script is a normal TXT File composed with 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 file Script 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 key-words are written inside sharp like this : #IF#

The basic structure that must be present in every Script is formed by the keyword #WEBQUERY# and the Block #RIGHPAGEFOUND#, we will see better their functions

A Script consists in 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 Web-Page you want and proceeds to gathering infomation in the way that is written on the Script. Of course, a script written for imdb.com will not work in the dvdempire.com site, and probably you will have an unpredictable end of program.

As I have said, what must be on the Script is the Keyword #WEBQUERY# 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 not indispensable.
For Example, if the information got from imdb.com is satisfactory to you, but you want all the BoxCover inside dvdempire.com, you can write a Fully 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 in eXtreme Movie Manager Import Config the Cover Option and you will take only that.

Why Block Structure? :
For every information imported there is a special Block, this because if user want import only a particular thing, he can uncheck all the others directly inside the software, without modify the script. For example, for take the TITLE of a movie, you should write all instructions inside this Block:

#MOVIETITLE#
    ......
    ......
    #TITLE#=#03# #ONERROR#=*ASK*
#ENDMOVIETITLE#

Of couser, you can also use only one Block ( #MOVIETITLE# in that case) to write ALL instructions for gathering all information, but your script will be less configurable by users.

 
Top


First & Second Script Generation

From eXtreme Movie Manager 1.0 engine can handle two different types of Scripts : the OLD, know also as First Generation, and the Latest, or Second Generation. The instructions and Function are the same for both ( 2° have some new ), but the difference is the HTML.
When engine detect a First Generation, the HTML is "pre-processed", this means that the HTML is rewrited in more line, how it is if you edit with a normal text editor. The Second Generation didn't pre-process the HTML (so the speed is increased), but the HTML in the most cases is in only one line. This means that a script of Second generation cannot work with Divxmanager 0.9, because the HTML are always pre-processed.

Divxmanager 1.0 can work with both 1° and 2° because can "read" the generation with this line :
#SCRIPTGENERATION#=2

The 2° have also another Header's variable : #REPLACESPACES#=
This tells to the engine what characters must be used for replace spaces in the movie title when quering the Web-sites. This is indispensable for web like ALLOCINE.FR (or the movie will not be found).




Functions & Instructions

Here is the list of Function available on MagicScript:

MagicScript Language Function Reference

#WEBQUERY#
#STARTREADWEB#
#FINDLINE#
#FIND#
#TAKEWORD#
#TAKEWORDLEN#
#READNEXTLINE#
#STRING#
#PUT#
#SETCURSOR#
#COMPUTECURSOR#
#PUTCURSOR#
#COMPUTEVAR#
#LOADCURSOR#
#IF#-#ENDIF#
#REPEAT#-#WHILE#
#RESETCURSOR#
#STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#GOTO#
#OPENNEWWEB#-#RESTOREWEB#
#SHOWVAR#
#CHECKVARIABLE#
#STRING#
#GETTITLE#
#CLEARTAGS#
#CONDITIONRIGHTPAGE#
#WRITETITLELIST#
#
#WRITETITLELISTACTORS#
#

 

 

 

 

 

 





 




















Special Function Reference

#TITLE#
#TAKEDIRECTOR#
#TAKEACTOR#
#TAKEGENRE#
#TAKERATING#
#TAKECOMMENTS#
#TAKEPLOT#
#TAKERUNTIME#
#TAKEYEAR#
#TAKEPOSTER#
#TAKECOUNTRY#
#TAKELANGUAGE#
#TAKETAGLINE#
#TAKEMOVIEID#
#TAKEPRODUCER#
#TAKEWRITER#
#TAKEREGION#
#TAKEEDITION#
#TAKESCREENDVD#
#TAKEAUDIODVD#
#TAKEPHOTOGRAPHER#
#TAKESTUDIO#
#TAKEMPAA#
#TAKEMUSIC#
#TAKEDISTRIBUTOR#
#TAKEOFFICIALWEB#
#TAKEACTORNAME#
#TAKEACTORBDATE#
#TAKEACTORBPLACE#
#TAKEACTORSEX#
#TAKEACTORCOUNTRY#
#TAKEACTORFILM#
#TAKEPICTURE#
#TAKECUSTOM10#
#TAKECUSTOM11#
#TAKEFILE#
#TAKESUBGENRE#
#TAKEUPC#
#TAKEACTORWEB#
#TAKEACTORBIO#
#TAKESEASON#
#ADDACTOR#
#

 

 

 

 

 

 






 

 

 

 

 

 

 

 

 

 

 

 



 

 

 

 

 

 

 



The #WEBQUERY# Instruction

Contains the query for question the Movie's Website.

Syntax:

#WEBQUERY#=text#MOVIE#text

Parameters:

text Required. The text of the proper query for access a web-site.
#MOVIE# Optional. Is the CONSTANT that contain the Title of the movie you are looking for.

Examples:

1.	#WEBQUERY#=http://imdb.com/Tsearch?title=#MOVIE#&restrict=Movies+only

The Engine will replace the Variable #MOVIE# with the title of it, so it can make the query to the web.

Remarks:

You can put this instruction where you want in the Script, but only ONCE (if there are more of this instruction, Engine will take the first)
Note that if you didn't write the CONSTANT #MOVIE#, you will probably find nothing from web.

Script Function Reference | Top


The #STARTREADWEB# Instruction

Reset the Read Engine to the first line of HTML and set the CURSOR Variable to 1.

Syntax:

#STARTREADWEB#

Parameters:

No Parameter  
This Instruction Tell to engine that you want start your search to the top of the HTML file. 

Remarks:

It's recommended that you put this instruction in all Blocks for re-initializing the Engine. If you read the title of a movie that is at the bottom of the HTML file, and then read the Director that is at the top,you will not find Director's info if you didn't re-initialize the engine with this instruction .

Script Function Reference | Top


The #FINDLINE# Function

Search for a string in all HTML page.

Syntax:

#FINDLINE#=text#??##ONERROR#=*options*

Parameters:

text Required. The text to find in the HTML.
#??# Required. The number of Variable where Function store the result of the Search.
               If the text is found, the variable will contain value 1 , if no text is found, value 0
#ONERROR#=*options* Optional. In the options you can specify what Engine must do in case of ERROR of the Function :
              STOP -> Will terminate the BLOCK where is the Function.
              ASK   -> Will show you the message of error and the script-line where is located
              OK     -> Will ignore the error and go on with executing the others functions 

Examples:

1.	#FINDLINE#=<title>#12##ONERROR#=*STOP*
2.	#FINDLINE#=<title> #01##ONERROR#=*ASK*

Note that these two functions search for different strings! the first search "<title>", Second the String "<title> " .Be careful!

This Instruction is useful when you want to  search for a particular string in the whole HTML , but you don't know where it is. It is different from the #FIND# 
function that searches for a string only in the CURRENT Line of HTML. To know the the position in the string where is text you are looking for begin,
you can use the CURSOR Variable.

Remarks:

This function writes on the main variable CURSOR the position where the string you are searching starts. Remember that all others functions start to
search text from the position of the CURSOR variable!.



Script Function Reference | Top


The #FIND# Function

Search for a string only in the CURRENT LINE of HTML page.

Syntax:

#FIND#=text#??##ONERROR#=*options*

Parameters:

text Required. The text to find in the HTML.
#??# Required. The number of Variable where Function store the result of the Search.
               If the text is found, the variable will contain his position , if no text is found, value 0
#ONERROR#=*options* Optional. In the options you can specify what Engine must do in case of ERROR of the Function :
              STOP -> Will terminate the BLOCK where is the Function.
              ASK   -> Will show you the message of error and the script-line where is located
              OK     -> Will ignore the error and go on with executing the others functions 

Examples:

1.	#FIND#=<title>#12##ONERROR#=*ASK*
2.	#FIND#=<title> #12##ONERROR#=*OK*
Note that these two functions search for different strings! the first searches "<title>",  the Second the String "<title> " .Be careful! 
This Instruction is similar to the #FINDLINE#, but searches for the text only in the current line of HTML.

Remarks:

This function writes also on the main variable CURSOR the position where the string you search starts. remember that all other functions start to
search text from the position of the CURSOR variable.


Script Function Reference | Top


The #TAKEWORD# Function

Takes a string from the current line;

Syntax:

#TAKEWORDLEN#=#?1#,#?2#,#?3#

Parameters:

#?1# Required. The Variable where is the Text Extracted.
#?2# Required. The Variable of starting point of the Text to extract.
#?3# Required. The Variable of ending point of the Text to extract. If you set this = "0", you will take all the line!

Examples:

1.	#TAKEWORD#=#03#,#01#,#02#
This Example takes a string from CURRENT LINE, starting from the position stored on variable #01# through #02# , and puts the text in the #03# Variable. 

Remarks:

This function is fundamental for working with strings, it doesn't modify the CURSOR Variable.

Script Function Reference | Top


The #TAKEWORDLEN# Function

Takes a string from the current line;

Syntax:

#TAKEWORDLEN#=#?1#,#?2#,#?3#

Parameters:

#?1# Required. The Variable where is the Text Extracted.
#?2# Required. The Variable of starting point of the Text to extract.
#?3# Required. The length of the string to extract.

Examples:

1.	#TAKEWORD#=#03#,#01#,#02#
This Example take a string LONG #02# from CURRENT LINE, starting at position stored on variable #01#, and puts the text in the #03# Variable. 

Remarks:

This function is fundamental for working with strings, it doesn't modify the CURSOR Variable.

Script Function Reference | Top


The #READNEXTLINE# Instruction

Read the next line of HTML and set the CURSOR Variable to 1;

Syntax:

#READNEXTLINE#

Parameters:

No Parameter

Remarks:

This instruction is useful when you have found a particular thing with #FINDLINE# instruction and you want analyze the text line by line.

Script Function Reference | Top


The #STRING# Function

Puts a string into a variable , the string can contain text and variables.

Syntax:

#STRING#=#?1#=[Text1][#?2#]{Text#??#}

Parameters:

#?1# Required. The Variable where put the string.
Text1, Text ... Optional. The Text you want put in the string.
#??# Optional. The Variable you want put in the string at the particular position.

Examples:

1.      #PUT#=www.emuitalia.com/#01#
        #PUT#=aletsg/#02#
	#STRING#=#04#=http:/#01##02#divxmanager/
This Example put in the Variable #04# the text "http://www.movieplayer.it/divxmanager/" that is formed of various text and variables . 

Remarks:

With this function you can build your strings before sending it to the Engine.

Script Function Reference | Top


The #PUT# Function

Puts a text or a number into a variable.

Syntax:

#PUT#=Text#??#

Parameters:

Text Required. The Text (or number) you want put into the variable.
#??# Required. The Variable where put the text.

Examples:

1.	#PUT#=mytext#02#
This Example put in the Variable #02# the text "mytext". 

Remarks:

Remember that your text must be inside "="<-and first->"#" : the function #PUT#=text#02#  is different from #PUT#=text #02# !.

Script Function Reference | Top


The #SETCURSOR# Function

Puts a value in the CURSOR Variable.

Syntax:

#SETCURSOR#=number

Parameters:

number Required. The number you want put into the CURSOR variable.

Examples:

1.	#SETCURSOR#=12
This Example puts in the value 12 in the CURSOR variable. 

Script Function Reference | Top

The #COMPUTECURSOR# Function

Makes a SUM or SUBTRACTION to the CURSOR variable.

Syntax:

#COMPUTECURSOR#=±number

Parameters:

± Required. Is the operation you want make.
number Required. Is the Value to SUM or SUBTRACT

Examples:

1.	#COMPUTECURSOR#=+2
This Example sum to the value of CURSOR "2". 

Script Function Reference | Top

The #PUTCURSOR# Function

Puts the value of CURSOR into a variable.

Syntax:

#PUTCURSOR#=#??#

Parameters:

#??# Required. The Variable where put the value of CURSOR.

Examples:

1.	#PUTCURSOR#=#01#
This Example puts in the CURSOR into #01# variable. 


Script Function Reference | Top

The #COMPUTEVAR# Function

Puts the value of CURSOR into a variable.

Syntax:

#PUTCURSOR#=#??#

Parameters:

#??# Required. The Variable where put the value of CURSOR.

Examples:

1.	#PUTCURSOR#=#01#
This Example puts in the CURSOR into #01# variable. 


Script Function Reference | Top

The #CONDITIONRIGHTPAGE# Special Function

Specifies if you have found directly the page of a movie.

Syntax:

#CONDITIONRIGHTPAGE# #?1#==#?2#

Parameters:

#?1# Required. The first variable to compare.
#?2# Required. The second variable to compare.
== Required. The Operator. It can assume this value :
              
"==" this means "Equal To"
               "<>" this means "Different to"

Examples:

1.	#CONDITIONRIGHTPAGE# #03#<>#04#

Here the page you found is directly of the movie if value of #03# variable is different from value of #04#.

Remarks:

You can use with this function only Variables, so if you need to compare a variable with a string, first you must #PUT# you string in another variable and then compare.

Script Function Reference | Top


The #WRITETITLELIST# Special Function

Writes the string in the MOVIE LIST FOUND; the string can contain text and variables.

Syntax:

#WRITETITLELIST#=[Text1][#?2#]    --->{Text#??#}

Parameters:

Text1, Text ... Optional. The Text you want write.
#??# Optional. The Variable you want put in the string at the particular position.
"    --->" Required. This String is REQUIRED : Engine use this for separate the URL of a movie from his TITLE!

Examples:

1.      #PUT#=Title=?0133093#06#
        #PUT#=Matrix, The#07#
	#WRITETITLELIST#=http://imdb.com/#06# ---> #07#
This Example write the URL and the TITLE of the "Matrix" Movie. 

Remarks:

You MUST use this function for create the list of all movies found on a page.

Script Function Reference | Top


The #TITLE# Special Function

Takes the TITLE of the movie.

Syntax:

#TITLE#=#??# #ONERROR#=*?*

Parameters:

#??# Required. The Variable where is stored the TITLE of the movie.
#ONERROR#=*options* Optional. In the options you can specify what Engine must do in case of ERROR of the Function :
              STOP -> Will terminate the BLOCK where is the Function.
              ASK   -> Will show you the message of error and the script-line where it is located
              OK     -> Will ignore the error and go on with executing the others functions 

Examples:

1.	#TITLE#=#03# #ONERROR#=*ASK*
This Example Takes the title of the movie that is stored on the #03# variable. 

Script Function Reference | Top

The #TAKEDIRECTOR# Special Function

Takes the Director of the movie.

Syntax:

#TAKEDIRECTOR#=#??#

Parameters:

#??# Required. The Variable where the NAME of the Director is stored.

Examples:

1.	#TAKEDIRECTOR#=#03#
This Example Takes the Name of Director of the movie that is stored on the #03# variable. 

Script Function Reference | Top

The #TAKEACTOR# Special Function

Takes the Name of an Actor.

Syntax:

#TAKEACTOR#=#??#

Parameters:

#??# Required. The Variable where the NAME of the Actor is stored.

Examples:

1.	#TAKEACTOR#=#03#
This Example Takes the Name of Actor that is stored on the #03# variable. You can use this function several time for take all actors.

Script Function Reference | Top

The #TAKEGENRE# Special Function

Takes the Genre of a Movie.

Syntax:

#TAKEGENRE#=#??#

Parameters:

#??# Required. The Variable where the GENRE of the Movie is stored.

Examples:

1.	#TAKEGENRE#=#03#
This Example Takes the Name of Actor that is stored on the #03# variable.

Script Function Reference | Top

The #TAKERATING# Special Function

Takes the Rating of Movie.

Syntax:

#TAKERATING#=#??#

Parameters:

#??# Required. The Variable where RATING of the Movie is stored.

Examples:

1.	#TAKERATING#=#03#
This Example Takes the Rating on the #03# variable.

Script Function Reference | Top

The #TAKECOMMENTS# Special Function

Takes the Comments of Movie.

Syntax:

#TAKECOMMENTS#=#??#

Parameters:

#??# Required. The Variable where the Comment of the Movie is stored.

Examples:

1.	#TAKECOMMENTS#=#03#
This Example Takes a comment on the #03# variable.You can use this several times for take all comment's line.

Script Function Reference | Top

The #TAKEPLOT# Special Function

Takes the Plot of Movie.

Syntax:

#TAKEPLOT#=#??#

Parameters:

#??# Required. The Variable where the Plot of the Movie is stored.

Examples:

1.	#TAKEPLOT#=#03#
This Example Takes a Plot on the #03# variable.You can use this several times for take all plot's line.

Script Function Reference | Top

The #TAKERUNTIME# Special Function

Takes the Runtime of Movie.

Syntax:

#TAKERUNTIME#=#??#

Parameters:

#??# Required. The Variable where Runtime of the Movie is stored.

Examples:

1.	#TAKERUNTIME#=#03#
This Example Takes the RUNTIME on the #03# variable.

Script Function Reference | Top

The #TAKEYEAR# Special Function

Takes the Year of Movie.

Syntax:

#TAKEYEAR#=#??#

Parameters:

#??# Required. The Variable where Year of the Movie is stored.

Examples:

1.	#TAKEYEAR#=#03#
This Example Takes the Year on the #03# variable.

Script Function Reference | Top

The #TAKEPOSTER# (#TAKEPICTURE#) Special Function

Takes the Poster of Movie and stores it for you.

Syntax:

#TAKEPOSTER#=#??#

Parameters:

#??# Required. The Variable where the URL of the Poster is stored.

Examples:

1.	#TAKEPOSTER#=#03#
This Example Takes the Poster at the URL stored on #03# variable.

Remarks:

You must write on the variable #??# the URL of the poster Image, Engine will download and rename it for you.You can use this function several times for download all images you want.

Script Function Reference | Top

The #LOADCURSOR# Special Function

Loads a value in the Cursor Variable.

Syntax:

#LOADCURSOR#=#??#

Parameters:

#??# Required. The Variable where the value is stored.

Examples:

1.	#LOADCURSOR#=#03#

Script Function Reference | Top

The #TAKEXXX# Special Function

Take the XXX Variable.

Syntax:

#TAKEXXX#=#??#

Parameters:

#??# Required. The Variable where the XXX of the Movie is stored.

Examples:

1.	#TAKEXXX#=#03#
This Example Takes the XXX on the #03# variable.

Script Function Reference | Top

The #RESETCURSOR# Special Function

Reset the Cursor variable.

Syntax:

#RESETCURSOR#

Parameters:

Examples:

1.	#RESETCURSOR#


Script Function Reference | Top

The #GETTITLE# Special Function

Put the title of the movie inn a variable, useful if you need the movie's title in the script.

Syntax:

#GETTITLE#=#??#

Parameters:

#??# Required. The Variable where the title movie must be loaded.

Examples:

1.	#GETTITLE#=#03#

Script Function Reference | Top

The #CLEARTAGS# Special Function

Clear all tags inside a variable.

Syntax:

#CLEARTAGS#=#??#

Parameters:

#??# Required. The Variable that must be cleared

Script Function Reference | Top

The #TAKEFILE# Special Function

Download a file from web and save it in the "Download" subfolder of XMM. Useful for Subtitles for example.

Syntax:

#TAKEFILE#=#??#

Parameters:

#??# Required. The Variable that contain the URL of the file

Script Function Reference | Top





Constant & Variables

In the MagicScript you can use VARIABLES & CONSTANT, some of them are fundamental for right import information. Let's see :

Variables

You have 50 VARIABLES at your disposal. You can use the variables in the script with this format #??#.
All Variables can contain strings & numbers, the Engine will automatically handle them in the right way. It's important that you write it correctly; for example if you want to use the variable 1, you Must write #01#!
Some FUNCTIONS write values directly into Variables. You must specify to every FUNCTION the number of the Variable where to put the result.
YOU CAN'T use any other name for a Variable : if you accidentally write a wrong format probably the function will have an unpredictable end.
NOTE : You can use the same variables for every Block ! Isn't important that you use every time different Variables, this is the reason because the number of 50 it's enough!

"Cursor" Variable

This is probably the most important variable in the Engine.
With this variable you can know/specify the position in a string where to start most FUNCTIONS, and you can do operations of SUM and SUBTRACTION that isn't possible to do with others VARIABLE. It works like a "Register".
Of course, you can also ASSIGN a particular VALUE to it.
Go to FUNCTIONS & INSTRUCTIONS to learn more.

top

Blocks

The Script consist of a series of BLOCKS, every one can import or make a particular thing. For example, the Block :

#MOVIETITLE#
    ......
    ......
    #TITLE#=#03# #ONERROR#=*ASK*
#ENDMOVIETITLE#


take the Title of the movie stored on the #03# VARIABLE.
There are 2 family of Blocks :

1- IMPORT BLOCKS for import movie information
2- GENERAL BLOCKS for make other various things.

Every Block has a "Begin" and an "End", as you can see, the end is set by KEYWORD with an END.
The Functions & Instruction inside the Blocks are executed sequentially until END-KEYWORD of the BLOCK is reached.

You can't Put a BLOCK Inside another. The result of this action may be unpredictable.

This is a List of Blocks Available at this time, more will come in future :


Import Blocks

BEGIN END SPECIAL FUNCTION DESCRIPTION
#MOVIETITLE# #ENDMOVIETITLE# #TITLE# Imports the TITLE of the Movie. Write the Code to find it and then use the special #TITLE# Function to pass it to eXtreme Movie Manager.
#DIRECTOR# #ENDDIRECTOR# #TAKEDIRECTOR# Imports the NAME of the Director of the Movie. Write the Code to find it and then use the special #TAKEDIRECTOR# Function to pass it to eXtreme Movie Manager.
#ACTORS# #ENDACTORS# #TAKEACTOR# Imports the ACTORS of a Movie. Write the Code to find ALL Actors and every time you find one, use the Special Function to ADD it to eXtreme Movie Manager.
#SUBGENRE# #ENDSUBGENRE# #TAKESUBGENRE# Imports the SUBGENRE of a Movie. Write the Code to find it and then use the special  Function to pass it to eXtreme Movie Manager.
#GENRE# #ENDGENRE# #TAKEGENRE# Imports the GENRE of a Movie. Write the Code to find it and then use the special  Function to pass it to eXtreme Movie Manager.
#RATING# #ENDRATING# #TAKERATING# Imports the RATING of a Movie. Write the Code to find it and then use the special Function to pass it to eXtreme Movie Manager.
#COMMENTS# #ENDCOMMENTS# #TAKECOMMENTS# Imports the COMMENTS to a Movie. Write the Code to find ALL Comments Linet and use the special Function to add it one by one to eXtreme Movie Manager.
#PLOT# #ENDPLOT# #TAKEPLOT# Imports the PLOT of a Movie. Write the Code to find ALL Comments Linet and use the special Function to add it one by one to eXtreme Movie Manager.
#RUNTIME# #ENDRUNTIME# #TAKERUNTIME# Imports the RUNTIME of a Movie. Write the Code to find it and then use the special Function to pass it to eXtreme Movie Manager.
#YEAR# #ENDENDYEAR# #TAKEYEAR# Imports the YEAR of a Movie. Write the Code to find it and then use the special Function to pass it to eXtreme Movie Manager.
#POSTER# #ENDPOSTER# #TAKEPOSTER# Imports POSTER,COVERS And ALL IMAGES you want, simply write the Code to find the "URL" of the POSTER and pass it at the Special Function that will convert and archive it for you!
#COUNTRY# #ENDCOUNTRY# #TAKECOUNTRY#  
#LANGUAGE# #ENDLANGUAGE# #TAKELANGUAGE#  
#TAGLINE# #ENDTAGLINE# #TAKETAGLINE#  
#MOVIEID# #ENDMOVIEID# #TAKEMOVIEID#  
#PRODUCER# #ENDPRODUCER# #TAKEPRODUCER#  
#WRITER# #ENDWRITER# #TAKEWRITER#  
#REGION# #ENDREGION# #TAKEREGION#  
#EDITION# #ENDEDITION# #TAKEEDITION#  
#SCREENDVD# #ENDSCREENDVD# #TAKESCREENDVD#  
#AUDIODVD# #ENDAUDIODVD# #TAKEAUDIODVD#  
#PHOTOGRAPHER# #ENDPHOTOGRAPHER# #TAKEPHOTOGRAPHER#  
#STUDIO# #ENDSTUDIO# #TAKESTUDIO#  
#MPAA# #ENDMPAA# #TAKEMPAA#  
#MUSIC# #ENDMUSIC# #TAKEMUSIC#  
#DISTRIBUTOR# #ENDDISTRIBUTOR# #TAKEDISTRIBUTOR#  
#OFFICIALWEB# #ENDOFFICIALWEB# #TAKEOFFICIALWEB#  
#CUSTOMINFO# #ENDCUSTOMINFO# #TAKECUSTOM10#
#TAKECUSTOM11#
 
#UPC# #ENDUPC# #TAKEUPC#  
#AWARDS# #ENDAWARDS# #TAKEAWARDS#  
#SEASON# #ENDSEASON# #TAKESEASON#  
       
#ACTORDATA# #ENDACTORDATA# ALL All Actor's functions must be inside this block
       



General Blocks

BEGIN END SPECIAL FUNCTION DESCRIPTION
#RIGHTPAGEFOUND# #ENDRIGHTPAGEFOUND# #CONDITIONRIGHTPAGE# Use This to know if you have found directly the page of the movie or you are in a movie's list page. You can set the Condition with special function, if positive, you have found it!
#CREATEMOVIELIST# #ENDCREATEMOVIELIST# #WRITETITLELIST# Use this to create a list of movies (if you haven't found the right page), but read carefully how to do in the Function Section!
#DELETETAGS# #ENDDELETETAGS# #CHECKVARIABLE#
#STARTDELETETAGS#
#DELETEWORD#
This is a particular Block. With this you can write to Engine what "Tags" or Word you want eliminate from a variable. You must go to the Help of the Function for learn more.
#SUBSTITUTETAGS# #ENDSUBSTITUTETAGS# #CHECKVARIABLE#
#STARTSUBSTITUTETAGS#
#SUBSTITUTEWORD#
This is a particular Block. With this you can write to Engine what "Tags" or Word you want replace from a variable. You must go to the Help of the Function for learn more.
       

          top

IF...ENDIF Statement

The Engine can support the IF Statement, but you can't make an IF statement inside another IF. It Means that you can use any IF you want but each one must be used separatly; however, you can put an IF Statement inside a REPEAT...WHILE and vice-versa
This release of MagicScript Doesn't support the "ELSE" statement, but you have the #GOTO# Function that will help you in many different cases. The Structure is :

#IF# #??#==#??#
    .....
    .....
#ENDIF#

The IF compares two (RED) VARIABLES, and supports only these variables. If the result of the comparison is positive, Engine will execute the instruction inside IF-ENDIF, else all instructions will be ignored.This means that if you want to compare two strings, you must put it on empty VARIABLES first and then use the IF Statement. This isn't a big limitation for this kind of application.

Operators

Operators you can use with IF Statement :

"=="  that means "Equal To", you can use it for strings and number comparisons
"<>"  that means "Different", you can use it for strings and number comparisons
"<<"  that means "Minor" , this makes a comparison only between numbers
">>"  that means "Major" , this makes a comparison only between numbers

It isn't supported any operator like <= or >= because these operators are useless.

top

REPEAT...WHILE Statement

The Engine can support REPEAT...WHILE Statement, but you can't make a REPEAT statement inside another REPEAT. It Means that you can use any REPEAT you want but each one must be used separatly. Inside a REPEAT, you can put all the instructions you want, also IF Statements (and vice-versa).
The Structure is :

#REPEAT#
    .....
    .....
#WHILE#
#??#==#??#

The WHILE compares two (RED) VARIABLES, and supports only these variables. If the result of the comparison is positive, Engine will execute the cycle of instructions again, otherwise it will terminate the REPEAT-WHILE Statement.If you want to compare two strings, you must first put them on empty VARIABLES and then use the WHILE. This isn't a big limitation for this kind of application.

Operators