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
 Questions and help on scripting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coffeetogo
Starting Member

United Kingdom
8 Posts

Posted - 29 Oct 2017 :  08:01:39  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

Hope this is the right part of the forum for this.

Just learning how to write scripts and need some detailed help.

1. How does the "§" work. Have found examples of use but nothing detailed. Would like to understand what it does in detail.

2. The code "#WRITETITLELIST#=http://www.somewebsiteorother.com#05# ---> #04# §#09#"
How does the " ---> #04# §#09#" bit work? confused by the ---> and the §.

3. Is there an official way to comment in a script. Using the debugging program "-" works outside of a tag. "//" seems to grey-out script inside a tag but then the line seems to still get processed in the debugger but not in XMM.

4. TABS. I've come across a line of HTML that contains the actor name on a single line with tabs.

HTML line looks like "[TAB][TAB][TAB][TAB][TAB][TAB]Name of actor¶"

Grabbing the whole line and using #TRIM# gets rid of the TABS but "#DELETEWORD#=\t [+ number of TABS needed]", "#DELETEWORD#=[TAB] [+ number of TABS needed]", #SUBSTITUTEWORD#=\t [+ number of TABS needed]=[space] seems to have no effect.

Is there a way of dealing with tabs other than with trim?



Many thanks in advance for your time.


Denis

Apologies posted this in Suggestions by accident and now can't seems to delete original post :-(

coffeetogo
Starting Member

United Kingdom
8 Posts

Posted - 29 Oct 2017 :  09:43:51  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks JDommi for the quick reply,

Re. 2.

As I work through the script I like to "turn off" lines to find the bugs and to stop sections working to speed things up. If the line "#TAKEWORD#=#69#,#67#,#68#" is changed to "//#TAKEWORD#=#69#,#67#,#68#" the debugger still runs (parses?) it but XMM doesn't. Gets a bit confusing. Will just temporarily delete lines in future.

Would be nice if say everything between //* ..... *// were ignored as in some other programs.


Re. 3.

I came across the post http://www.binaryworks.it/forum/topic.asp?TOPIC_ID=15228&SearchTerms=%A7 with your reply.

I'm wondering why this works and adds the actor name to the database

#TAKEWORD#=#69#,#67#,#68#
#CHECKVARIABLE#=#69#
#STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#TRIM#
#STRING#=#70#=#69#§
#TAKEACTOR#=#70#


but this doesn't

#TAKEWORD#=#69#,#67#,#68#
#CHECKVARIABLE#=#69#
#STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#TRIM#
#TAKEACTOR#=#69#

Is it because TAKEACTOR is actually a three part tag made up of Name, Character and WebID so you have to tell XMM which bits are included once you've got them?

i.e. would name#§§WebID enter only the name and webid into the XMM database?

and name#§Character§ enter only the Name and Character.


Re. 4.

The Checking part of my script has the entries


#CHECKVARIABLE#=#69#
#STARTDELETETAGS#
#STARTSUBSTITUTETAGS#
#TRIM#

and

#DELETETAGS#

#DELETEWORD#=\t\t\t\t\t\t\t\t\t\t
"then repeated through 9 to 2 ending with"
#DELETEWORD#=\t
#DELETEWORD#=[TAB][TAB][TAB][TAB][TAB][TAB][TAB][TAB][TAB][TAB] (note: a real TAB used not [TAB] just put it in like this for the post as a real TAB won't show up"
"then repeated through 9 to 2 ending with"
#DELETEWORD#=[TAB]

The above seems to have no effect as if the TRIM tag is removed the info passed to the database contains TABS. I think this is to do with XMM rather than your excellent Debugger.


Thanks again.


Denis




Edited by - coffeetogo on 29 Oct 2017 12:23:07
Go to Top of Page

JDommi
Administrator

Germany
4635 Posts

Posted - 29 Oct 2017 :  10:48:48  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
2. The Debugger is a 3rd party plugin coded without having the original code of the MagicScript Editor. So there are a few differences... especially as XMM is coded in VB.Net and my plugin in (old) Delphi 7.
#TAKEWORD#=#69#,#67#,#68#" change to "#//TAKEWORD#=#69#,#67#,#68#" to disable it. That way you will quickly find it later.

3. Simply because of the missing WebID identifier. The correct string to parse to #TAKEACTOR# is Actor'sName§WebID where the WebID is optional. Just like the character.
There are existing to version for #TAKEACTOR#
- #TAKEACTOR#=Actor'sName§WebID
- #TAKEACTOR#=Actor'sName§Character§WebID
Taking the character only is (unfortunately) not implemented in XMM.

4. ahem... Please write or copy/paste the used code and include it between [ code] and [ /code] for a better understanding.
It's a little bit difficult to read all the \t and [TAB]

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

coffeetogo
Starting Member

United Kingdom
8 Posts

Posted - 29 Oct 2017 :  12:21:10  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

code bit in the DELETE the #DELETETAGS#. the first 10 delete spaces, the next 10 delete TABS. The "\t"s were to test if that was a way to delete TABS as I noticed some scripts used "#SUBSTITUTEWORD#=\n\r=#NEWLINE#" and thought it might work.


    #DELETEWORD#=          
    #DELETEWORD#=         
    #DELETEWORD#=        
    #DELETEWORD#=       
    #DELETEWORD#=      
    #DELETEWORD#=     
    #DELETEWORD#=    
    #DELETEWORD#=   
    #DELETEWORD#=  
    #DELETEWORD#=										
    #DELETEWORD#=									
    #DELETEWORD#=								
    #DELETEWORD#=							
    #DELETEWORD#=						
    #DELETEWORD#=					
    #DELETEWORD#=				
    #DELETEWORD#=			
    #DELETEWORD#=		
    #DELETEWORD#=	
    #DELETEWORD#=\t\t\t\t\t\t\t\t\t\t
    #DELETEWORD#=\t\t\t\t\t\t\t\t\t
    #DELETEWORD#=\t\t\t\t\t\t\t\t
    #DELETEWORD#=\t\t\t\t\t\t\t
    #DELETEWORD#=\t\t\t\t\t\t
    #DELETEWORD#=\t\t\t\t\t
    #DELETEWORD#=\t\t\t\t
    #DELETEWORD#=\t\t\t
    #DELETEWORD#=\t\t
    #DELETEWORD#=\t
Go to Top of Page

JDommi
Administrator

Germany
4635 Posts

Posted - 29 Oct 2017 :  13:24:15  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Give a concrete example, please. I'm still not sure what the problem is.

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

coffeetogo
Starting Member

United Kingdom
8 Posts

Posted - 29 Oct 2017 :  14:16:00  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you look at https://www.dvdempire.com/1785136/deadpool-blu-ray-dvd-ultraviolet-blu-ray.html?qs=Deadpool%20 Blu-ray%20 %20DVD%20 %20UltraViolet

The section Audi/Video. The source code contains loads of TABS. Hope that helps as an example. www.dvdempire.com is the only site I've come across that writes code with TABS in it. Everyone else uses spaces.

Thanks

Denis




							</li></ul><!-- Features List --><a name="features" class="anchor"></a><div class="spacing-bottom"><h2 class="border-bottom-site-default">Features</h2><p>- Deleted/Extended Scenes with Optional Audio Commentary by Director Tim Miller<br />- Gag Reel<br />- From Comics to Screen... to Screen<br />- Gallery (Concept Art, Costumes, Storyboards, Pre-vis, Stunt-vis)<br />- Deadpool's Fun Sack<br />- Audio Commentary by Ryan Reynolds and Screenwriters Rhett Reese & Paul Wernick<br />- Audio Commentary by Director Tim Miller and Deadpool Co-Creator/Comics Artist Rob Liefeld</p></div><!-- Audio/Video List --><a name="audio/video" class="anchor"></a><div class="spacing-bottom"><h2 class="border-bottom-site-default">Audio/Video</h2><ul class="list-unstyled spacing-bottom"><li><strong>Audio</strong><br />
									
										
											English Dolby Digital 5.1
											<br />
										
											French Dolby Digital 5.1
											<br />
										
											Spanish Dolby Digital 5.1
											<br />
										
											French Dolby Digital Surround
											<br />
										
											Spanish Dolby Digital Surround
											<br />
										
											English DTS-HD MA 7.1
											<br /></li></ul><ul class="list-unstyled spacing-bottom"><li><strong>Video</strong><br />
									
										
											Widescreen 2.40:1 Color 
Go to Top of Page

JDommi
Administrator

Germany
4635 Posts

Posted - 29 Oct 2017 :  14:46:24  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Why handling all those tabs?
Just try this code:

  #FINDLINE#=<strong>Audio</strong>#11#
  #READNEXTLINE#
  #READNEXTLINE#
  #READNEXTLINE#    //or #READNEXTLINE#=1 to read the next non empty line
  #TAKEWORD#=#13#,#00#,#00#    //take the whole line
  #CHECKVARIABLE#=#13#
  #TRIM#
  #TAKEAUDIO#=#13#

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

coffeetogo
Starting Member

United Kingdom
8 Posts

Posted - 29 Oct 2017 :  16:19:29  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

that is what I ended up doing but just wanted to know why the other way wouldn't work.

Seems a bit OCD I know but it was bugging me.

Thanks for the help on the other stuff


Denis
Go to Top of Page

JDommi
Administrator

Germany
4635 Posts

Posted - 29 Oct 2017 :  17:09:23  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To be true, I never have tried to replace or find a tab.

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.23 sec. Powered By: Snitz Forums 2000 Version 3.4.07