Dynamic End Jump Script

I'm new to scripting in DVD studio Pro. Lately I have been attempting to create dynamic buttons to return to the same menu, and the next available button. The below link is the tutorial that I have been following.
The script worked perfectly when I only had one menu. My project is becoming more complex with different menus. The script no longer works properly. Instead of going to the same menu, it goes to the very first menu. It still goes to the next button, just not the right menu. How can I program it to jump to the previous menu?
http://dvdstudiopro.digitalmedianet.com/articles/viewarticle.jsp?id=34239-0

The script depends on using the layout in the outline view of DVDSP to work - the menu at the top of the list has a value of 32. The next menu down has a value of 64, etc. The idea is that you don't worry about the actual menu, but consider the order in which they are listed in the outline view as the most important info.
I prefer not to use that method, relying instead on using either pre-scripts (if not using GPRM based button jumps) or stand-alone scripts. I tend to change a value in a GPRM as I move from menu to menu and rely on that value along with the stored value in SPRM8. My script would be something like this, assuming I am tracking menus in GPRM1:
mov GPRM0, SPRM8
div GPRM0, 1024
add GPRM0, 1
Jump menu1 [GPRM0] If(GPRM1 = 1)
Jump menu2 [GPRM0] If(GPRM1 = 2)
Jump menu3 [GPRM0] If(GPRM1 = 3)
This would get me on to the next button on the menu I came from. However, you have to think about what happens when you start on the last button on a menu - by adding '1' to the value in GPRM0 (having loaded it with SPRM8) you could feasibly end up with a value that doesn't exist for a button. To counter this, you could put in a conditional statement in line 3:
add GPRM0, 1 If(GPRM0 <= X)
where X is the value of the last but one button. If the user was on the last button, the 'add' line gets ignored and the user gets sent to the menu and the last button on it.
The only other thing to do is add three scripts which set the value into GPRM1 each time you move to a new menu. So, before loading the first menu, go to this script:
mov GPRM1, 1
Jump menu1
then, when moving to the second menu, go to this script:
mov GPRM1, 2
Jump menu2
and so on for each menu that you have got. Don't use pre-scripts in this system - the GPRM based button jumps won't work.
Whilst this relies on you adding the scripts as necessary, it is probably a more dependable method than using the DVDSP values for menus.
I believe Dave Nagel's scripts are better for DVDSP v2/3, but can't be sure.

Similar Messages

  • End Jump Scripting

    I know nothing about scripts exept that it appears to be the only answer to my problem.
    I have a project with a series of standard menu's which access various clips and slideshows. However the client also wants all the clips to be accessable via an index menu. So, once a clip ends I need it to jump to the next button of the last menu played which could be the standard menu or the index menu.
    How can I make this happen?
    Mike

    There was a very similar question posted about this recently.
    You do it in a number of ways, but the scripting is fairly easy. The theory is that you need to assign a value to each menu so that you can always know which you came from. To do this create a script per menu and write the following:
    mov GPRM0, 1
    Jump menuname
    Each time you write that script, in the first line you change the value (use the 'immediate' setting in the script editor to do this), and on the second line you put the correct menu name. Now, every button on any menu that points to a different menu should instead point to the relevant script. This will then overwrite the value in GPRM0 each time you move between menus.
    When you start playback and want to get back to the correct menu you either use an end jump or the menu button. You can create a script which reads the value in GPRM0 and goes back to the appropriate menu, but you also want to go to the next logical button on that menu (not the one that was last selected).
    Every DVD player has an internal set of registers which record all kinds of different pieces of information. One of these records the value of the last button played. If you read that value and then add '1' to it you should then have the value of the next logical button, right?
    But, those values are stored in increments of 1024, so we have to do some extra maths to get it to where we need it:
    mov GPRM1, SPRM8
    div GPRM1, 1024
    In the first line we copy the value in SPRM8 to a memory slot (SPRM8 holds the value of the last button selected). We then divide it by 1024 to get it into a usable state. Now we can add the '1':
    mov GPRM1, SPRM8
    div GPRM1, 1024
    add GPRM1, 1
    So, in GPRM0 we have the value of the last menu we were on, and in GPRM1 we have the value of the next logical button. We can now combine those two pieces of information into a script that does the end jumps and menu calls automatically. We need to use GPRM based button jumps and conditional commands (Compare commands). The following script should do what you want...
    mov GPRM1, SPRM8
    div GPRM1, 1024
    add GPRM1, 1
    Jump menu1 [GPRM1] If (GPRM0 = 1)
    Jump menu2 [GPRM1] If (GPRM0 = 2)
    Jump menu3 [GPRM1] If (GPRM0 = 3)
    But, what if the user was already on the last button on the menu, and you add one to it before jumping back to the menu? Fortunately, what happens is that if there is no button that corresponds to the number in the script, you go to the default button for the menu... usually button 1.
    Of course, you could probably do a lot of this using stories instead, but to me the scripted solution is a lot more elegant and once you have your head around the way it all works, is a lot quicker to set up, making a 'cleaner' project.

  • Scripting play all end jump problems.

    hi all
    in my project i have a script that plays all of my tracks following the 'scripting a dynamic play all button in dvd studio 3' help sheet i found on this discussion forum. for it to work i need to set the end jump of the tracks to a 'play next script.'
    However, when i want to play one individual track from the menu it finishes on a black screen and remains there as i cant set the end jump to return to the main menu as it is in use with the play next script.
    can anyone help im at my wits end
    many thanks in advanced.
    ed

    Ed:
    Wellcome to the forums!
    You can get the PLAY ALL / PLAY EACH chapter feature using just Stories with no scripting at all. Check this Stories Tutorial.
    I found that way easier than scripting.
    Hope that helps !
      Alberto

  • Does track end jump trump chapter or story end jump?

    I have a DVD with 1 menu & 3 tracks. Tracks 1 & 2 each contain l short video (different audio or video formats) and track 3 contains 3 short videos which I have broken into 1 story w/3 chapters. On track 1, there is 1 chapter marker and I have set its end jump back to the menu. The end jump for the track itself is set to Track 2. Button 1 connection is set to the chapter marker. Ditto for track 2 except its end jump is set to track 3 while its one chapter marker end jump is set to menu 1. Button 2 is targeted to track 2, chapter 1. Track 3 has 3 chapters. It's end jump is set to menu 1. The chapters within the story are also set to menu 1 and it works the way I want it to. Button 6 is a PLAY ALL button targeted to track 1. When I select button 1, the video ends and continues on to track 2 instead of going back to menu 1;. When I select button 2, it also contiunues on (to track 3) instead of jumping back to menu 1. My goal was to be able to access each individual video and then jump back to the main menu. I tried adding stories to each of Track 1 & 2 and making the story end jump go back to he main menu but it seems the track end jump trumps both chapter & story end jumps. Anybody have any solutions to my problem? thanks.
    Steve

    Hi:
    You can do it using a script. Take the DVDSP User Manual and look for the topic Jumping to a Menu's Loop Point (Chapter 14 - Creating Scripts) and you'll find a detailed description of how to do it.
    DVDSP User Manual download page
    Hope it helps!
    (1191)
      Alberto

  • Set end jump to stop, still won't stop...

    I have a 20 minute dvd program with no menus that is set to play upon insertion. Set chapter 1 end jump to stop - didn't stop. Added a chapter 2 marker in black at the end of the program and set its end jump to stop - still won't stop. Read the other threads that suggest I do what I've already done. Tried both in simulator and burned discs and played in my DVD player -- program just keeps looping. Thanks for any help...

    Personally, I wouldn't put the end jump on the marker - I would set it for the track. You can end jump to a script if you need, which simply reads:
    Exit
    (which I guess is what you are already doing). However, if you are putting an end-jump on a marker, make sure it is not placed at the very end of the track. If you have a marker just on the section of black, then set the end jump of the marker before to go to your script. This earlier marker finishes where the next marker starts, so you should exit before the black section.
    If you exit in this manner, then pressing play on the remote should re-start the disc from the beginning again, but the track should not loop. Are you seeing the loop on a software or hardware player?
    It is, as you say, a simple task. I cannot get the track to loop if I end jump to an exit script, so I am not at all sure why you would be seeing this behaviour.

  • Menu/end jump going haywire

    I have 2 stories, each has a different menu and end jump. when I set them in the connections/target window, one story works correctly and the other does not. what in the world is going on?
    I run into glitches like this in DVDSP all the time, if you select fade through black on your menu transitions, a lot of times it still just does a dissolve to the next screen. if you go in and select some different transitions then select fade through black again, it'll work. frustrating

    I think it is possible your project is somehow corrupted. Whenever some things work like they should and other do not I have had more luck starting a new project and starting over with the same elements. In all cases this has solved the problem for me.
    Usually this happens with larger projects that contain lots of tracks and scripting but that doesn't mean it won't happen on smaller projects.
    I have never fixed problems by trashing DSP preferences.
    You may also want to do a safe boot and use Disk Utility to repair disk permissions on your boot drive and then restart. It may not solve the issue but it certainly can't hurt the performance of your system.

  • End Jump question

    I'm putting together a DVD that begins with a series of 6 movie trailers (in one block) which then end jumps to the main menu.
    I also have a Trailers menu, from which I need to link to each individual trailer
    My questions is - how do I make the trailers individually linked to end jump back to the trailers menu screen, yet leave the first play trailers unaffected?
    Message was edited by: Marc Morris

    I think you need stories (or scripting?) meaning that you play all the trailers or just individual ones.
    Place a maker before each section and set a "Play All" story with all markers in the story and set the end jump for that story to where you want it to go.
    Then make a story for each trailer and set end jump for those.

  • End jump conundrum

    So I have created an issue for myself:
    Have several videos. Each can be accessed from two different paths. For example, you can click on a button on Screen A to watch Video X; you can also click a button on Screen B to watch Video X.
    What does one do with the end jump in such a case?
    Thanks in advance...

    James Roller1 wrote:
    Thank you.
    As you may have guessed I am an novice at this... I am a yearbook adviser who makes one DVD per year, so I have to grapple with this annually, but not enough to recall much from year to year.
    Couple of questions:
    1) Am I correct in recalling that these scripts cannot be tested via the simulator?
    They can be tested, but it is never 100%, I use it more to catch errors before building rather than saying it is good to go.
    2) Is there any quick way to test?
    Building and playing off the hard drive is the next step, then building and formatting to a disc and testing on a few players (if not more)
    3) Another question regarding the info you presented:
    If there are only two ways to movie X, through screen A or screen B,
    AND
    there are only two ways to movie Y, through screen C or screen D (etc... for every movie)...
    ...can screens A and C use script 1 to set the variable while screens B and D both use script 2 to set the variable for the end jump for their respective movies? or does each screen (menu) require a unique script?
    Probably not (well you could but it is a pain and I would not count on it being as reliable). Stories may be the easiest. Menu A sends to story A and set end jump for story A, Menu B jumps to story B, etc. At some point scripting may be easier (many menus, tracks etc.) but for smaller things stories are easier initially. (At least IMO, though scripts have good points. Though with DVD SP sometimes the scripts due to the Abstraction Layer can be..ummm..funky sometimes. Though for basic scripts [which would work for what you are doing] and avoiding certain calls they will work.)
    Hope that makes sense.

  • End jump woes

    I have a single track with 4 chapter markers. Each chapter marker end jumps back to my main menu.
    For chapters 2, 3 and 4 this works perfectly.
    However, when the track gets to the end of the first chapter, it continues on, without returning to the main menu, even though the end jump on the marker has been properly set?
    Any ideas?
    Thanks.
    david

    The "end" marker method works well for a variety of issues, and I use it myself all the time.
    However, as far as specifying end jumps for individual markers, there can be several things that may prevent these from working correctly, from the use of scripts to more spcific command overriding the defaults, to differences in playback setups. I also recommend stories to provide a more reliable solution. I usually include the "end" marker in each story to preserve the ability to skip to the end without jumping to the next track.
    Hope this helps -
    Max

  • 2 menus: how do I end jump back to the menu I was just in?

    Hello,
    I'm fairly new with DVD SP, but am happily hacking my way around. From what I've read, I believe the answer to my question lies with Scripts, which I'm not familiar with and found the official documentation on it a little thin.
    Perhaps someone can help out with the following...
    I have 2 menus pointing to the same Track. That Track has several elements in it, all Chapter Marked. On the two menus, the buttons point to each of those tracks, and the chapters play fine.
    The problem is with the end jump of each chapter. Currently, I have it set to return to Menu 1, but ideally, if my last chapter was selected from Menu 2, I would like for the end jump to send the user back to Menu 2, not Menu 1.
    Again, I'm totally novice with scripts. If this is too complicated to explain, can anyone direct me to some documentation somewhere that would narrow this technique down for me?
    Thanks in advance,
    Alain
    MacBook Pro 2.16GHz Intel Core Duo   Mac OS X (10.4.8)   2 GB Memory

    Take a look here
    http://dvdstepbystep.com/stories_details.php
    You can set the stories so that each one jumps to a different place
    1.) Remove all jumps from the markers outside the story
    2.) Make the stories by dragging the markers you want to play (they can be identical, so each story can play marker 1,2,3 for instance)
    3.) If story A called from menu 1, set end jump for story A to menu 1

  • How do I ignore end jumps on tracks?

    I put end jumps on my tracks to get viewers back to one of the submenus that they chose the track from, but I want a play all function as well. How do I get all the tracks to play all the way through without them jumping back to a menu?

    Stories or scripts, stories probably easier
    http://dvdstepbystep.com/stories_details.php
    http://dvdstepbystep.com/passelections.php
    http://dvdstepbystep.com/stories.php
    http://discussions.apple.com/thread.jspa?messageID=447
    1104
    http://discussions.apple.com/thread.jspa?messageID=454
    8144
    http://discussions.apple.com/thread.jspa?messageID=396
    2038
    http://discussions.apple.com/thread.jspa?messageID=329
    5221
    I have 27 tracks though, not just one. Can I still create stories?

  • 2 buttons, same end jump target

    I'm working on a project in which I had to make 2 buttons for each entry, one for text and the other using a button from the palette without text, but both pointing to the same target. I now find that I can't give both these buttons the same end jump. Am I doing somthing wrong.
    Jeff

    This is why DVDSP provides you with scripting. You would need to write values to a GPRM. A value of 1 might represent the first button while a value of 2 for a GPRM might represent the second. When the track is done playing you would need to go to another script to test which value is currently active and route your track to the appropriate location.

  • DVDSP Project Unexpected End Jump On Windows

    Hey all, I wonder if anyone else has encountered this issue. There are quite a few occassion when I burn a dvd project and give it to my client that runs windows, they encounter end jump isssues. The project runs perfectly on a Mac and all three of my dvd players. All three are differnt brands.
    When they tell me of these issues, I go back and double check all my end jumps, etc. and everything is in order. This is baffling to me. And there are times they say even in their dvd players the end jumps are wacky.
    I usually end jump back to the original/last button pressed directly, not via a script.
    Thoughts and suggestions would be greatly appreciated.
    I vaguely remember reading somewhere that it could be a media or burn issue. Who knows. Could it be the Windows dvd playback software? I just want to give my client some comfort that it's a DVDr issue and that when they go to master from the DLT all will be fine.
    Michael

    i have seen this a couple of times with some of the DVD's i have done the end jump has started the movie over and not went to the menu like it should do but works fine on my win/tel box, 4 dvd players and all of my mac's. i have even had it just stop and do nothing on some older dvd players in computers.
    the 3 things i tell my clients when this happens is.
    1. it past our companies QA which includes testing it on 6 computers and 4 dvd players.
    2. DVD's are only rated to work correctly about 95% of the time on 90% of the DVD players becuase of this some times it will not work correctly on some dvd players.
    3. make sure your system and your dvd app are updated.
    i once had a client that could not view a dvd on his home dvd players ( 2 of them) or his work computer but every one else in his office could play it fine and every thing worked as it should.
    i never say this to clients but you get what you pay for and if that is a 15.00 wal-mart DVD player or a 20.00 mistutaku dvd-CD drive in your computer well what do you want.

  • End jump for Play All not working

    Below is my question on an earlier post, followed by an answer from a forum member, which I thought was the solution. I followed his suggestion to link the play all button to Track 1, and then clicked in the track to get the track inspector and linked the end jump to Menu 1. It must have worked in the simulator, because I marked Steve's answer 'solved', but now when I play the discs I've burned, the play all button plays only the first selection and then return to the menu. Same thing happens in the simulator.
    So please tell me how to get that play all button to really play all. It's driving me crazy, and I have to recall 2 discs I sent out to clients so far. If someone could walk me through it, I'd really appreciate it, thanks!
    MY POST: I have 9 markers on the track for 8 selections, the 9th was added so that the track would play all the way through when the Play All button on the menu was clicked. When the user clicks on any one selection it plays through and returns to the menu. I can't get the Play to do that, it just stops at the end and the user has to click play to get the menu back on the screen. Again, the manual on page 490 mentions setting end jumps and says the end jump for the last marker is not linked to any targets, and must be set yourself. So I have tried several times to do this in an number of ways as suggested by the book. No go.
    Again, simplest possible explanation, please, as I've used a lot of time on this, and have lost most of my concentration and patience(!)
    thanks
    Dual 1.25 GHz PM/G4 Mac OS X (10.3.x) DVDSP3
    Steven Cohen
    Posts: 103
    Registered: Jul 10, 2001
    Re: End Jump Setting for Play All
    Posted: Aug 19, 2008 1:43 AM in response to: Keith Rodan
    Solved
    Click to reply to this topic Reply email Email
    Link the "Play All" button to the track, not the first chapter marker. Then click on the track. In the inspector, settings for the track will appear. For end jump, select menu 1. (or whatever you want it to jump to.) If you want each segment on the track to play individually and then jump back to the first menu, easiest way to do that is with stories. Check manual or do search of this forum on ways to do that. Hope that helps.
    Steve

    Hi Keith - there are several ways to do this. By far the simplest is to use stories, but there are two ways of doing that, too.
    Here's one way:
    Make sure you have the 8 markers that you need, and make sure that each marker has got an end jump on it to return you to your menu and the button for that section. Now add a single story and add ALL of the markers to that (drag them over from the story editor window left to right). You'll notice that the markers are labelled 'Chapter 1 Entry', which means you are not adding the end jumps to the story... each marker will play and then go on to the next in the sequence, ignoring any end jumps you have already put on the markers.
    Now set your play all button on your menu to go to the story container (NOT chapter 1 inside the story). All you other buttons should point to the relevant markers on the track and not in the story.
    Set the end jump for the story to go back to the 'play all' button on your menu, and set the menu call for the story to do the same. You can set the menu call for the markers as you want, too.
    You should now have a single track, eight markers with end jumps, a single story with 8 chapter entry markers in it and a disc that alows you to play a single marker or the entire lot.
    The alternative way to do this is to add your 8 markers as before (no need for 9), make sure there are NO end jumps on the markers and then add 8 stories. Put one marker into each story and set the end jumps on each story to go back to the relevant menu button. Set the menu calls for each story to do the same.
    Now set your single chapter play menu buttons to the relevant story container (and NOT the chapter inside it), and your pay all button to the track itself. Set the end jump and menu call for the track to go where you want them to.
    There are then at least two other ways to do this using scripts... but I figure these here should cover what you need right now! I'd recommend using the first method - it's quicker to set up and more simple to implement.

  • How to fix Syntax Error: Expected end of line, etc. but found end of script. in applescript?

    I am making an applescript for my modding tool for Minecraft. It used to use multiple apps and I am now trying to make one app for all the tasks.
    Here is the code:
    say "You are running iCraft version one point one for minecraft version 1.2.5"
    display dialog "Which tool do you want to use?" buttons {"Mod Installer", "Backup", "Restore"} default button 3
    set the button_pressed to the button returned of the result
    if the button_pressed is "Mod Installer" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Insert all mod files into the Mods folder."
    display dialog "Have you inserted all Mod files into the Mods folder?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished"
    else
    display dialog "Insert mod files into the Mods folder and restart iCraft.app."
    end if
    if the button_pressed is "Backup" then
    display dialog "Are you sure you want to backup your Minecraft.jar in it's current state?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished, find it in your Backups directory in the iCraft folder"
    else
    display dialog "Backup aborted"
    end if
    if the button_pressed is "Restore" then
    display dialog "Are you sure you want to restore your Minecraft.jar with your backup?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/resources/s…
    else
    display dialog "Restore aborted"
    end if
    end
    When I try to compile/run it gives me Syntax Error: Expected end of line, etc. but found end of script.

    Your script got mangled when pasting it into your message, but the main problem looks like you are missing a bunch of end if statements.  Unless your if statements are contained on one line, you need to terminate them with a matching end if statement - for example, the following are equivalent:
    if someString is "whatever" then display dialog "foo"
    if someString is "whatever" then
      display dialog "foo"
    end if

Maybe you are looking for

  • How to reinstall bootable system 9 in a PowerPC G4/1.25 DP (Mirrored Drive)

    Hi all, I have two machines bootable with OSX and OS9 PowerPC G4/1.25 DP (Mirrored Drive Doors) dual 1.25 GHz PowerPC 7455 (G4) and iBook G3/900 900 MHz PowerPC 750fx (G3) I have some MACOS9 software which just doesn't work in classic mode with any O

  • How do I open the door to my Optical Network Terminal (ONT) to replace the backup battery

    I have an ONT that looks like this: http://www.verizon.com/cs/groups/public/documents/adacct/bbux400-open.jpg How do I open the door to it to replace the battery? Thanks Ben Solved! Go to Solution.

  • Wireless Build - IP Addressing

    I'm about to commmence the deployment of 4 x 4402-50 WLCs and 170 Access Points into a 3 storey building, and have a couple of questions around the IP addressing, which I'd like to clarify with those more knowledgeable than I. Current plan is to inst

  • Cant find error in code

    This code adds to the database, but it wont redirect me back to the inventory page. I have set it to in the server behaviours but it doesnt want to redirect. Here is my page code: <?php require_once('Connections/drama_database.php'); ?> <title>Add Ne

  • Live Photoshop 3D

    Hi! i was amazed when i found out that this was possible but was very pissed to find out that I cant make this work. when i import it, the .psd file is just a 2d image like a normal boring picture in the composition. it doesn't have any cameras or nu