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 8, 9, 10 Forum
 Scripts
 Script error.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Fabrizio
Starting Member

Italy
25 Posts

Posted - 02 Sep 2017 :  08:23:43  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi, I'm using version 7.2.2.4 DeLuxe Edition (but probably the sintax of the script insn't changed)

I'm trying to modify a script, because it doesn't work anymore.
Probably the page layout is changed.

I've opened the initial script (mymovies.it) and try to obtain data required, but something goes wrong.

This is the Html lne:

<tr><td valign="top">Anno</td><td><a title="Film 2016" href="http://www.mymovies.it/film/2016/">2016</a></td></tr>

and this is the script block

#YEAR#
#STARTREADWEB#
#FINDLINE#=<td valign="top">Anno</td>#12##ONERROR#=*ASK*
#FIND#=/">#01# #ONERROR#=*ASK*
#FIND#=</a>#02# #ONERROR#=*ASK*
#TAKEWORD#=#03#,#01#,#02#
#CHECKVARIABLE#=#03#
#//STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#TAKEYEAR#=#03#
#ENDYEAR#

I can't obtain a valid string (even wrong!)
Aboslutely nothing. (and no error message).

What's wrong? How can I modify the script to obtain the right data?

Thank in advance.

JDommi
Administrator

Germany
4650 Posts

Posted - 02 Sep 2017 :  10:01:13  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
#YEAR#
#STARTREADWEB#
#FINDLINE#=<td valign="top">Anno</td>#12#
#FIND#=/">#01#
#FIND#=>#01#  // without this line you will get: ">2016
#FIND#=</a>#02#
#TAKEWORD#=#03#,#01#,#02#
#CHECKVARIABLE#=#03#
#//STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#TAKEYEAR#=#03#
#ENDYEAR#

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Fabrizio
Starting Member

Italy
25 Posts

Posted - 05 Sep 2017 :  23:34:42  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, this works!
I modified the script for director, genre, movietitle, originaltitle, officialweb and actors.
The only one data remaining is cover.
Can you help me?

HTML lines:

"@type": "ImageObject",
"caption": "Poster Split",
"url": "http://pad.mymovies.it/filmclub/2016/07/182/locandina.jpg",
"fileFormat": "image/jpg",
"width": "420px",

script block:

#RESTOREMAIN#
#STARTREADWEB#
#FINDLINE#=locandina.jpg#15##ONERROR#=*ASK*
#FIND#=http:#01# #ONERROR#=*ASK*
#FIND#=",#02# #ONERROR#=*ASK*
#TAKEWORD#=#03#,#01#,#02#
#TAKEPOSTER#=#03#

I've got this error:

Can't Find The Word on the #FIND# Instruction: http:Line : 518

Can you help me?
Go to Top of Page

JDommi
Administrator

Germany
4650 Posts

Posted - 06 Sep 2017 :  07:47:35  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I'm not sure if #FINDLINE# sets the cursor to the position of the search term, too, so use a #RESETCURSOR# after it when you search an expression that is before in that line (or use #FINDPREVIOUS#).
The next thing is that #FIND# sets to cursor to the beginning of the seach term and not to the end of it.
To make it more complicated:
#TAKEWORD#=#03#,#01#,#02# takes the postion from #01#+1 to #02#-1
In your case #03# contains ttp://pad.mymovies.it/filmclub/2016/07/182/locandina.jpg

#RESTOREMAIN#
#STARTREADWEB#
#FINDLINE#=locandina.jpg#15##ONERROR#=*ASK*
#RESETCURSOR#
#FIND#="http:#01# #ONERROR#=*ASK*
#FIND#=",#02# #ONERROR#=*ASK*
#TAKEWORD#=#03#,#01#,#02#
#TAKEPOSTER#=#03#

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Fabrizio
Starting Member

Italy
25 Posts

Posted - 09 Sep 2017 :  23:03:02  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry for my answers, but I'm learning to write script on my own, and it's really difficult with the few instruction in the wiki.
Now I've to get an information from a subpages of the main page.
I can't unerstand how can I proceed.
I have to use OPENWEBSLOT and LOADWEBSLOT or better OPENNEWWEB?

this is the code:

//------- WEBSLOT3 --------//
#STARTREADWEB#
#FINDLINE#=trailer/?#12# #ONERROR#=*STOP*
#FIND#=id=#12# #ONERROR#=*STOP*
#FIND#==#02# #ONERROR#=*STOP*
#FIND#="#09# #ONERROR#=*STOP*
#TAKEWORD#=#03#,#02#,#09#
#CHECKVARIABLE#=#03#
#//STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#STRING#=#43#=http://www.mymovies.it/trailer/?id=#03#
#OPENWEBSLOT3#=#43#

this snippet function well! (I've check it whit Magic Script Editor and the URL: http://www.mymovies.it/trailer/?id=46941 is correct).



then the code:

#TRAILER#

#LOADWEBSLOT3#
#RESTOREMAIN#
#STARTREADWEB#
#FINDLINE#=trailer.flv#15##ONERROR#=*ASK* --------- here the error: the script doesn't find 'trailer.flv'
#FINDPREVIOUS#=type: 'video/flash'#01# #ONERROR#=*ASK*
#FIND#='http#01# #ONERROR#=*ASK*
#FIND#=.flv#02# #ONERROR#=*ASK*
#TAKEWORD#=#03#,#01#,#02#
#STRING#=#04#=#03#.flv
#TAKETRAILER1#=#04#

the problem is in the first FINDLINE command, because it doesn't find nothing.
But I'm sure the word 'trailer.flv' is contained in the page http://www.mymovies.it/trailer/?id=46941 (you can verify yourself).
So what's wrong?

Web slot aren't the right approach for this problem?
Can you suggest me a solution?
I don't undertand the different from WEBSLOT and OPENNEWWEB. It seems to be the same.

Thanks in advance.
Go to Top of Page

JDommi
Administrator

Germany
4650 Posts

Posted - 09 Sep 2017 :  23:32:34  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try to use the MagicScript Debugger plugin. Here you can see at least the correct syntax and short infos.

#LOADWEBSLOT# preloads a webpage that you can later call by #LOADWEBSLOT# (maybe multiple times if needed). #RESTOREMAIN# returns from the active slot back to the main page.
#OPENNEWWEB# immediately loads a new page that you can work with until you use #RESTOREWEB#.

So the bug is quite obvious...
#LOADWEBSLOT3# <- loads the trailer page
#RESTOREMAIN# <- returns to the main page <--- put it after #TAKETRAILER1#=#04#


And don't worry about your questions. It would be good to have another user who is able to repair/modify scripts.

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Fabrizio
Starting Member

Italy
25 Posts

Posted - 10 Sep 2017 :  11:44:48  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your quicly reply.

I've confused #RESTOREMAIN# with #STARTREADWEB#. A newbie stupid error!

So, in this case, which approach do you suggest? Better use LOADWEBSLOT or OPENNEWWEB?
Consider that I need to open that page only once in the script for only one specific block.
May be better OPENNEWWEB? Or I can implement LOADWEBSLOT, so, if in the future I'll make a change at the script, I have alredy loaded the page and the script doesn't waste time?

Thanks for your support.
Go to Top of Page

JDommi
Administrator

Germany
4650 Posts

Posted - 10 Sep 2017 :  12:16:36  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In my opinion it's quite the same.
The web slots are used directly after you have selected the movie. In block #LOADWEBSLOTS# you can preload up to 5 sub pages. #OPENNEWWEB# is normally used when reading a sub page adress inside another block. I think the time waste is identical for both commands.
I personally use the slots for adresses that can be found on the main movie page and newweb when gettting the wanted page from a subpage.

Example:
Webslots:
movie page -> full cast & crew -> webslot 1
movie page -> filming location -> webslot 2

Newweb:
webslot 1 -> actor's page

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

Fabrizio
Starting Member

Italy
25 Posts

Posted - 10 Sep 2017 :  12:16:38  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I didn't have MagicScript Debugger plugin.
It's possbile to install it in version 7.2.2.4, as well?
Where can I find it?
Go to Top of Page

JDommi
Administrator

Germany
4650 Posts

Posted - 10 Sep 2017 :  12:20:30  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
http://www.mediafire.com/file/ia05c0bqd9bn5kh/Debugger.rar

Maybe some commands are not existing in XMM release 7 but that can only be very few.

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
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.12 sec. Powered By: Snitz Forums 2000 Version 3.4.07