VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Nov 2009
    Location
    Belgium
    Search Comp PM
    I have been learning to use GUI for Muxman for the past few days and am now trying to edit the the .xml file to add a option to play the chapters randomly. Ik found the following code on the Muxman website and it works perfectly:

    Item=Pre Commands
    {
    Rnd gprm1, 6
    if ( gprm1 == 1 ) LinkCN TitleSet1_Title1_cell1
    if ( gprm1 == 2 ) LinkCN TitleSet1_Title1_cell2
    if ( gprm1 == 3 ) LinkCN TitleSet1_Title1_cell3
    if ( gprm1 == 4 ) LinkCN TitleSet1_Title1_cell4
    if ( gprm1 == 5 ) LinkCN TitleSet1_Title1_cell5
    LinkCN TitleSet1_Title1_cell6
    }
    Item=Cell Commands
    {
    cell1: LinkTopPGC
    }
    And in every cell: Command=cell1

    This takes away the option to stil play in normal order so i wanted to add an if, testing if a variable is 0 or 1 depending on whether random is on or not. For this i added if ( GPRM2 == 1 ) Rnd gprm1, 6 to the pre part instead and then 2 buttons to switch between the 2 options. I cannot, however get this to work. I have tried taking a different number for GPRM and even using a compare command. Everything checks out except that one if at the top in the pre.

    Can anyone help me out? I'm sure it is something simple... Also, if i want to place more than one command in a if, how to I need to write this?
    Quote Quote  
  2. The VM is not like a 'normal' programming language. You are not allowed to use 'any' statement after an 'if'. To achieve your goal, use a 'goto' construct:
    Code:
    	if ( GPRM2 == 1 ) GoTo Tag1
    	if ( GPRM2 == 2 ) GoTo Tag2
    	Break
    Tag1:	Rnd gprm1, 6
    		if ( gprm1 == 1 ) LinkCN TitleSet1_Title1_cell1
    		if ( gprm1 == 2 ) LinkCN TitleSet1_Title1_cell2
    		if ( gprm1 == 3 ) LinkCN TitleSet1_Title1_cell3
    		if ( gprm1 == 4 ) LinkCN TitleSet1_Title1_cell4
    		if ( gprm1 == 5 ) LinkCN TitleSet1_Title1_cell5
    		LinkCN TitleSet1_Title1_cell6 
    		Break
    Tag2:	JumpVTS_TT TitleSet1_Title1
    		Break
    Quote Quote  
  3. Member
    Join Date
    Nov 2009
    Location
    Belgium
    Search Comp PM
    I see, thanks, I'll try that
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!