Jumpstart finish script question

Does anyone know if it is possible to write a jumpstart finish script in perl? I guess this is equivalent to asking if there is a perl interpreter on the mini-root?
Trying to script modifications to /etc/vfstab with sh/sed/awk is making me feel ill...
-Thanks

AFAIK, Nope!
But, you can do something else if you're not sed/awk savvy...
echo ":wq!" | vi -c "%s!<initial regex>!<desired regex>!g" <filename>
or some variant of this would allow you to modify files via the script (I do it all the time).

Similar Messages

  • Smpatch in finish script

    I want to path my new system in the finish script of the jumpstart server.
    I do a patchadd -R /a with the Solaris 10 last patch cluster.
    I would like to do it with smpatch an our patchproxy server since it's the new way in solaris.
    I try to do a smpatch set patchpro.patch.source=... smpatch analyze smpatch update in a chroot /a in the finish script but the java in smpatch crash with an internal error.
    Did somebody as a solution for that ?
    My other idea was to create a single-user milestone smf service in the finish script where I will do the smpatch and other things at the first reboot , then remove the service and reboot on last time the server with the new configuration.
    Since the jumpstart and the patch ... take sometime. I want to stop the server before the login prompt until the last clean reboot.
    Thanks.
    Cyril

    Yep that worked. I still dont know what the all on the end of pkgadd does, it was a bit of a guess, (from 2.6?) anyway, it wasnt documented as far as I could tell in the man page. Now its working I am very happy. So ill keep the Duke points.

  • Finished script: Use grep find/change to fill in a supplied table of contents

    This script is now complete, and has been the subject of most of my previous posts. Just in case anyone wanted to know what the finished script ended as, here it is.
    Thanks so much to all. A lot of really helpful folks on this board are very responsible for the success of this task. This script is to be one of hopefully many in the creation of our records. But it's a huge leap forward. Thanks again to everyone that helped.
    Cheers,
    ~Nate
    Task:
    Automatically find town names in listings, and fill in table of contents template on page 2 accordingly.
    Example of page 2 toc, initially:
    Example of a page of content. The town names are what need to be referenced on the TOC:
    Example of page 2 toc once script is finished:
    Because of the need to include the transaction dates on the TOC (comes as a provided, tagged-text file), a simple Indesign-generated TOC can't be used alone.
    This script uses an Indesign-generated TOC that's on a master page called "T-tocGen" ... It then uses grep search and replaces to grab the needed information, and insert it into the page 2 TOC.
    The script will update a generated TOC and then search for an instance of a page number, and town name. The generated toc lists all included towns in the following format:
    (line start)## tab townName(line end)
    In Grep, this would be (please note, extra \ for \d and \t ... javascript needs that for some reason):
    ^\\d+\\t(.*)$
    After the script gets the info it needs from a found instance of the above, it replaces that line with "---", to prevent that line from being picked up once again.
    The script with then place the needed page number in it's rightful place on page 2, replacing the XX.
    A while loop is used to repeat the above process until there are no longer any instances of "^\\d+\\t(.*)$" present.
    Not every town runs every issue, so once the script is done, it removes all remaining instance of "XX" on the page 2 TOC.
    FINAL CODE:
    TOC replace
    This script will use grep find/change methods to apply page numbers in
    tocGen to the XX's on page2TOC.
    // define the text frame of generated TOC
        var tocGenFrame  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
    // udpate generated TOC ... store contents in tocGenStuff
        var tocGenStuff = updateTOCGen();
    // set variable for while loop
    var okGo = "1";
    // while okGo isn't 0
    while(okGo.length!=0)
    // get town info from tocGen
    getCurrentTown();
    // replace XX's with tocGen info
    replaceTown();
    // grep find ... any remaining towns with page numbers in tocGen?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // set current value of okGo ... with any instances of above grep find in tocGen
    okGo = tocGenFrame.findGrep();   
    // grep find/change all leftover XXs in page2TOC
    app.findGrepPreferences = app.changeGrepPreferences = null;       
    app.findGrepPreferences.findWhat = "^XX\\t";
    app.changeGrepPreferences.changeTo = "\\t";
    app.activeDocument.changeGrep();  
    // clear grep prefs
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //  functions                  //
    function getCurrentTown()
    // grep options   
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // grep find:  startLine anyDigits tab anyCharacters endLine
          app.findGrepPreferences = app.changeGrepPreferences = null;
          app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // get grep find results      
    currentGen = tocGenFrame.findGrep();  
    // store grep results content into currentLine
    currentLine = currentGen[0].contents;
    // match to get array of grep found items
    currentMatch = currentGen[0].contents.match("^\\d+\\t(.*)$");
    // second found item is town name, store as currentTown
    currentTown = currentMatch[1];
    // change current line to --- now that data has been grabbed
    // this is because loop will continue as long as the above grep find yields a result
           app.findGrepPreferences.findWhat = "^\\d+\\t"+currentTown+"$";
                  app.changeGrepPreferences.changeTo = "---";
                tocGenFrame.changeGrep(); 
    function replaceTown()
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // find: XX currentTown .... replace with: currentLine
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "^XX\\t"+currentTown+" \\(";
        app.changeGrepPreferences.changeTo = currentLine+" \(";
    app.activeDocument.changeGrep();   
    function updateTOCGen()
    //set vars ... toc text frame, toc master pag
        var tocGen  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
        var tocGenPage  = document.masterSpreads.item("T-tocGen").pages.item(0);
    //SELECT the text frame generatedTOC on the master TOC
        tocGen.select();
    //Update Table of Contents by script menu action:
        app.scriptMenuActions.itemByID(71442).invoke();
    //Deselect selection of text frame holding your TOC:
        app.select(null);
    //store contents of toc text frame in variable
        var tocGenText = tocGen.contents;
    //return contents of tocGen
        return tocGenText;

    Thanks for the reply.
    You are correct but the problem is there are three rows, One row is 100% black, the second is 60% black and the third is 40% black. I want to change the black to blue, the 60% black to an orange and the 40% black to a light shaded blue. In the find/change option you can select the tint you want to find and replace but yea.. does work on table cells.. oddly enough.

  • Quick SAP Script question New Page Print

    Quick SAP Script question
    I have added a new page to an existing SAP Script BUT only want it to print if a condition is true.
    I need to do this from within the form as the print program is SAP Std.
    Any idea how I can prevent the new page from printing?
    i.e. I need the form NOT to call the new page if the condition is false. Is there a way of forcing an exit or stop from with in the form?

    Hi,
    To trigger a new page, there is script ediotr command NEW-PAGE.
    so find where is that command is triggered and use the below code for trigger it on any specific condition....
    if &condition& = 'True'
    /*  NEW-PAGE
    elseif
    /: NEW-PAGE   
    endif
    so it means if condition is satisfied your new page will not work.. else it will...
    Hope you got it...
    Try this..
    Best luck..
    Regs,
    Lokesh.

  • Scripting Question - Very Basic

    Hello, I'm using the trial version of InDesign and am wondering if because it's the trial version that I can't load custom scripts from Adobe?  I've downloaded and installed a Custom Calendar script [I can see the extracted files in/on my PC] but the app apparently doesn't see it.  Any help you can offer is greatly appreciated.  Thanks, 

    Thank you so much, you were spot on. 
    From: Peter Spier <[email protected]>
    To: Friar5 <[email protected]>
    Sent: Monday, December 12, 2011 3:18 PM
    Subject: Scripting Question - Very Basic
    Re: Scripting Question - Very Basic created by Peter Spier in InDesign - View the full discussion
    Have you put thew script in a location that InDesign uses for scripts? See How to install scripts in InDesign | InDesignSecrets
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4079869#4079869
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4079869#4079869. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How do i finish this question?

    hello, I have an assignment due today, but after working for about 1 week, i could still not finish
    the question, since I am very new and lagging in class, as I am taking my time to understand the subject... Can anyone help me finish this assigment? reply me ASAP. Many thanks.
    Here is the question:
    4.1 The Student class
    Create a file called ' Student.java' and in it define a class called Student which has the following attributes:
    a String variable which can hold the student's name
    a double variable which can hold the student's examination mark
    Both of these variables should be declared 'private' so that their values can only be manipulated by methods inside the class.
    In the Student class, define public methods as follows:
    A constructor method which accepts no arguments. This method should initialise the student's name to 'unknown' and set the examination mark to zero
    A constructor method which accepts two arguments - the first being a String representing the student's name and the other being a double which represents their examination mark. These arguments should be used to initialise the state variables with one proviso - the exam mark must not be set to a number outside the range 0..100. If the double argument is outside this range, set the exam mark attribute to 0.
    A reader method which returns the student's name.
    A reader method which returns the student's exam mark.
    A writer method which sets the student's name.
    A writer method which sets the student's exam mark. If the exam mark argument is outside the 0..100 range, then the exam mark attribute should not be modified.
    A method which returns the student's grade. The grade is a String such as "HD" or "FL" which can be determined by the following table:
    Grade Exam mark
    HD 85..100
    DI 75..84
    CR 65..74
    PS 50..64
    FL 0..49
    4.2 Client code program.
    Write a Java program in a file called ' TestStudent.java'. Make sure you save this file in the same directory on your file system as the file ' Student.java'. In the main method of ' TestStudent.java', write code to do each of the following tasks:
    Create a Student object using the no-argument constructor.
    Print this student's name and their examination mark.
    Create another Student object using the other constructor - supply your own name as the String argument and whatever exam mark you like as the double argument.
    Print this student's name and their examination mark.
    Change the examination mark of this student to 50 and print their exam mark and grade.
    Change the examination mark of this student to 256 and print their exam mark and grade.
    4.3 Notes
    The program ' TestStudent.java' need not be complex as it is simply being used to test the operation of the Student objects. If you wish, you can make the program interactive (by using KeyboardReader), allowing the user to enter the name and exam marks, but this is optional.

    Actually I think that thread got rather confused at times and may not be the best use of your time.
    Post some of what you have done, point out the bits you are having trouble with and ask some specific questions. You'll get some helpful answers.
    If you really can't get started you need to go back to your tutor and ask for some extra tuition to get you sorted on the basics.

  • Quick script question

    Hi all,
    Could anyone advise me if i can add anything within - header('Location: http://www.mysite.co.uk/thankyou.html'); in the script below so as the page
    re- directs back to the main index page after a few seconds ?
    Thankyou for any help.
    <?php
    $to = '[email protected]';
    $subject = 'Feedback form results';
    // prepare the message body
    $message = '' . $_POST['Name'] . "\n";
    $message .= '' . $_POST['E-mail'] . "\n";
    $message .= '' . $_POST['Phone'] . "\n";
    $message .= '' . $_POST['Message'];
    // send the email
    mail($to, $subject, $message, null, '');
    header('Location: http://www.mysite.co.uk/thankyou.html');
    ?>

    andy7719 wrote:
    Mr powers gave me that script so im rather confused at this point in time
    I don't think I "gave" you that script. I might have corrected a problem with it, but I certainly didn't write the original script.
    What you're using is far from perfect, but to suggest it would lay you open to MySQL injection attacks is ludicrous. For you to be prone to MySQL injection, you would need to be entering the data into a MySQL database, not sending it by email.
    There is a malicious attack known as email header injection, which is a serious problem with many PHP email processing scripts. However, to be prone to email header injection, you would need to use the fourth argument of mail() to insert form data into the email headers. Since your fourth argument is null, that danger doesn't exist.
    One thing that might be worth doing is checking that the email address doesn't contain a lot of illegal characters, because that's a common feature of header injection attacks. This is how I would tidy up your script:
    <?php
    $suspect = '/Content-Type:|Bcc:|Cc:/i';
    // send the message only if the E-mail field looks clean
    if (preg_match($suspect, $_POST['E-mail'])) {
      header('Location: http://www.example.com/sorry.html');
      exit;
    } else {
      $to = '[email protected]';
      $subject = 'Feedback form results';
      // prepare the message body
      $message = 'Name: ' . $_POST['Name'] . "\n";
      $message .= 'E-mail: ' . $_POST['E-mail'] . "\n";
      $message .= 'Phone: ' . $_POST['Phone'] . "\n";
      $message .= 'Message: ' . $_POST['Message'];
      // send the email
      mail($to, $subject, $message);
      header('Location: http://www.example.com/thankyou.html');
      exit;
    ?>
    Create a new page called sorry.html, with a message along the lines of "Sorry, there was an error sending your message". Don't put anything about illegal attacks. Just be neutral.
    By the way, when posting questions here, don't use meaningless subject lines, such as "Quick script question". If you're posting here, it's almost certain to be a question about a script. It doesn't matter whether it's quick. Use the subject line to tell people what it's about.

  • Unique Script Questions-timed startup?

    Hello All,
    I am long time mac fanatic with some unusual script questions. I have a project ongoing where I will need to put my pb 15" in a remote location with a Canon camera. Canon has transmitter device which will allow me via ethernet to ftp to my pb.
    Here's essentially what I need to the script to do and I am trying to find out just how feasible this is. I need my laptop to bootup to receive photos via ftp at a certain time period. The camera will send to the builtin ftp software. Once booted I need the script to hold for period of about an hour. Once time has elapsed I need the script to connect to the internet via a broadband EVDO card. We are using one of the EVDO cards built in to Tiger. It then must ftp a folder of images to a remote server.
    Simple, huh? : ) I am running Transmit as my ftp software. I believe it is scriptable and will watch a folder to send.
    Any ideas? I'd love to hear them. I can be reached via scott at scottaudette.com.
    This setup is going be used in very cool photo location but I can't publicly announce where.
    Scott
    G5 and PB 15"   Mac OS X (10.4.7)  

    'Transmit ... I believe it is scriptable' - yes it is. Go to How can I use AppleScript with Transmit? to download sample 'Transmit' scripts.
    'Once booted I need the script to hold for period of about an hour.' - well then, save the script as a 'stay open' application, with an 'on idle () ... end idle' handler - with a return of (60 * 60) seconds; and then drag the saved application onto the 'System Preferences' 'Accounts' 'Login Items' tab's list - of the user which the Mac will boot to (when turned ON).
      Mac OS X (10.4.4)  

  • Can I post here(Acrobat Windows) Java Script questions here?

    Hello
    Can I post here(Acrobat Windows) Java Script questions here? If not, wht is the correct forum?
    THank you

    Back up and down to Acrobat Scripting. Bot Windows and MacIntosh Acrobat versions use the same JavaScript.
    If you are using LIVECYCLE DESIGNER use their forums. The JavaScript syntax and objects are different in LIVECYCLE DESIGNER!

  • Adobe Forms - FormCalc Scripting Question for Image Control

    Hi All,
    I have three images on my master page. I have a hidden text field. Based on a certain value within this text field I need to turn off Imagefield B and ImageField C and Leave ImageField A visible.
    I know this can be done via FormCalc scripting.
    My Questions:
    Which event shoudl I put the script in? I was thinking the textfield initialize event.
    What would be the EXACT syntax to turn turn image fields on or off?
    Please inform if know.
    Regards,
    Salil

    I solved it now, just changing the FormCalc expression.
    Instead of using the expression:
    this.value.image.href = xfa.resolveNode(this.value.image.href).value;
    I used this:
    this.value.image.href = xfa.record.Images.URL;
    The URL value of Image Field, in this case is:
    <b>$record.Images[*].URL</b>
    And, to finish, I needed to add a Text Field bounded to  <b>$record.Imagens[*].URL</b>, case else the image doesn't appear.
    That's it!

  • FLASH MX 2004 action script question

    Hi!
    I need to create an script for a basic function; when mouse goes over a moveclip, that works also link, I want it to trigger an invisible red dot on a nerby map. I have created a movieclip and named it "red", it's a 1 sec clip with nothing in the beginning and a red dot in the end. I want this dot to trigger and show only when mouse goes over this specific link, otherwise it must be invisible.
    I know this is pretty basic stuff and I have done this before few years back but I have forgotten how to do it and need help now.
    Any help would be very much appreciated :-)
    Kim

    I still need help, this problem is little more complicated;
    I can manage making the red dot visible and invisible by triggering roll over and roll out on a button.
    The problem is, I have a navbar which is line of flags made to a movie clip, with 5 invisible buttons. These buttons are configured to do three different actions; get URL, trigger a light effect and a movement effect.
    Now I need this invisible button to trigger my red dot also so that when mouse is over a certain flag a red dot appears on a map on the correct location.
    I have the red dot on a new layer. It has instance name "redDot" and on the very first frame of this red button layer, I have action script that says: redDot._visible = false;
    This works as it should and the dot is invisible when the movie has loaded.
    I need to make this invisible button to trigger the visibility of my red dot, and I have tried to add the code:
    on (rollOver) {
    redDot._visible = true;
    on (rollOut) {
    redDot._visible = false;
    to this invisible button, but it dosent work, furthermore it affects the other functions of the button/movie clip, which were working fine before.
    Here is the code attached to this invisible button so far:
    on (release) {
    getURL(/:url1);
    on (rollOver) {
    gotoAndPlay(2);
    on (rollOut) {
    gotoAndPlay("sec");
    I have the URL:s on an external text file.
    So my question is; where do I add the action script to make it visible when moving the mouse over this invisible button? To my understanding, it should go in the same place as the other code that is working, but I'm doing something wrong...
    I tried to do this:
    on (release) {
    getURL(/:url1);
    on (rollOver) {
    gotoAndPlay(2)
            redDot._visible = true;
    on (rollOut) {
    gotoAndPlay("sec")
    redDot._visible = false;
    But it is wrong, I also tried like this:
    on (release) {
    getURL(/:url1);
    on (rollOver) {
    gotoAndPlay(2);
    on (rollOut) {
    gotoAndPlay("sec");
    on (rollOver) {
    redDot._visible = true;
    on (rollOut) {
    redDot._visible = false;
    But it makes the other functions that worked to stop working.
    I also tried to give the invisible button an instance name and do it like this:
    invisible.on (rollOver) {
            redDot._visible = true;
    invisible.on (rollOut) {
    redDot._visible = false;
    And put them in the actions layer of button movie clip but nothing works.
    Flash is really giving me a headache now...
    To conclude, I made a simple test button, put it on the scene somewhere and and attached the rollOver and rollOut codes, targeting the "redDot" and it works fine, the button didn't need a instance name to work. I don't understand why I can't make it to work with the invisible button where it should be.
    I hope this clarifies the point and I can get some help with this and sorry for bothering again with this problem.
    Oh and I use old Flash MX 2004.
    Thanks
    Kim

  • Madwifi-ng preup/predown script question [solved]

    Hi,
    I recently installed Arch 0.7.1 on my laptop.
    So far I am very impressed with the speed and the simplicity :-)
    I just have one small problem: madwifi-ng
    Currently, I have to manually create the ath0 interface with wlanconfig, which is annoying. On the Gentoo forum I have found a partial script with preup/predown functions (the thread is located here)
    preup() {
    if [ "${IFACE}" == "ath0" ]; then
    /sbin/wlanconfig ath0 create wlandev wifi0 wlanmode sta > /dev/null
    return $?
    fi
    if mii-tool ${IFACE} 2> /dev/null | grep -q 'no link'; then
    ewarn "No link on ${IFACE}, aborting configuration"
    return 1
    fi
    return 0
    predown() {
    if [ "${IFACE}" == "ath0" ]; then
    killall wpa_supplicant
    /sbin/wlanconfig ath0 destroy
    return $?
    fi
    return 0
    I am using a Netgear WG511T pcmcia card.
    I would really appreciate any suggestions on where to put this code, and how to modify it for use with Arch Linux, or if I should use something else alltogether.
    Thanks in advance!

    Another interesting problem: I recently upgraded to the latest madwifi-ng code with svn update and also started using wpa_supplicant 0.5.0 (upgraded from 0.4.7)
    The netcfg script stopped working and after a little tinkering I discovered that  the following section from start_profile() in the netcfg script was killing wpa_supplicant before it could connect:
    while ! wpa_cli status | grep "wpa_state=COMPLETED" >/dev/null 2>&1; do
    if [ $i -gt 10 ]; then
    wpa_cli terminate >/dev/null 2>&1
    ifconfig $WIFI_INTERFACE down
    stat_fail && return
    fi
    sleep 2
    let i++
    done
    fi
    I have now commented out the loop and running the command "netcfg netgear" no longer halts there and so far everything seems to be fine again. I am guessing more than a 20 second timeout is needed, so I'll try having the iterator increment to 30 or something and see if that solves it.
    [EDIT]
    Now using  [ $i -gt 30 ]; and it works. On second thought, since everything  now really just works and my main question was essentially answered, I am adding [solved] to the title.
    Thanks again!
    [/EDIT]

  • Simple Action Script question

    This is probably a very basic question, but going through all
    my old Flash work didn't help me remember...
    I have my animation starting on the main stage with an image
    fading in. when that is done playing, at the end i want it to go to
    a movie clip on the stage and play it from frame 2. what is the
    action script for this?

    Doesn't seem to be working... your_mc is the instance name of
    the mc, correct? i placed this script in a frame - it's above where
    my mc first appears and the initial animation on the stage ends. is
    that correct?
    stop();
    tellTarget(mc_square-grid){
    gotoAndPlay(2);
    When I test the movie, the initial animation plays then
    stops, but the MC does not start playing. and the following error
    message appears:
    Target not found: Target="NaN" Base="_level0"
    quote:
    Originally posted by:
    ActionScripter1
    tellTarget(your_mc){
    gotoAndPlay(2);

  • ITunes Apple Script question

    Any thoughts why the following script generates will only force a refresh of the smart playlist "Random Country" if Live Updating is turned off. This script works for the other two playlists shown which have Live Updating turned on.
    on run
              tell application "iTunes"
      --delete every track of playlist "Random Christian"
      --delete every track of playlist "Mainstream"
                        delete every track of playlist "Random Country"
              end tell
    end run
    I get the following error why I run the script with Live Updating activated.
    error "iTunes got an error: every track of playlist \"Random Country\" doesn’t understand the delete message." number -1708 from every track of playlist "Random Country"
    I am currently running iTunes 11.0.2 on OSX 10.8.2

    Thanks Winston Churchill. I was missing purchased content (cloud stuff) on my ATV2. The problem was with iTunes and many others were having similar problems. I asked them to fix iTunes so it worked, but they insisted on giving me outdated instructions that had no relevance to me. It is very frustrating dealing with them. I intentionally shortened my question when I asked it here just to find out what the directions they gave meant and you have answered that. Thanks again. This is the thread about missing shows:
    https://discussions.apple.com/message/16486299#16486299

  • Complicated Scripting Question

    Here is a little background before my question-
    I have been making DVDs that basically consist of a main menu and a chapter menu. I have only one track in my project for the video. When the viewer selects "play video" from the main menu the entire video track plays then returns to the main menu. When they select a chapter from the chapter menu the same video track plays from whichever chapter marker they selected.
    I wrote a short script so if a viewer watches the video from the main menu and presses the menu button they will be brought to the main menu, and if they are watching the video via selecting a chapter they will be returned to the chapter menu when the menu button is pressed.
    I did this by having a prescript for each menu (mov GPRM 0, Current Item)
    and assigning a script to the menu button (Jump Indirect GPRM 0).
    But..now I have to make a DVD which is just like this except it must have double the menus (one set in english, one set in portuguese). They will both share the single (bilingual) video track.
    So I need to make a first menu which lets the viewer select their language, once they select that they need to be brought to their language's main menu.
    My first question is can I write a script so that once they are brought to a main menu based on what language they chose, whenever they press the title button they will be returned to this main menu and not the language selection menu or the wrong language's main menu.
    My second question is how would I write a script so when a viewer presses menu while watching the video they will be returned to the last menu the came from (main menu or chapter menu) keeping in mind that there are 2 sets of each menu.
    I'm still new to scripting and I'm having a hard time wrapping my head around all the different menus. If any one has the time to throw out any suggestions I would greatly appreciate it.
    Powermac G4 Dual 1.42   Mac OS X (10.4.4)  
    Powermac G4 Dual 450   Mac OS X (10.3.9)  

    You know, there's times when stories are just dandy for sorting the problem, and there's times for scripts... this seems like a time for scripting to me! Drew - your solution will work, but it seems so long...
    What I would do is this.
    From the very first menu make each button to select the language go to a script - and then on to the correct 'main' menu:
    mov GPRM0, SPRM8
    div GPRM0, 1024
    Jump EnglishMenu If (GPRM0 = 1)
    Jump FrenchMenu If (GPRM0 = 2)
    Jump SpanishMenu If(GPRM0 = 3)
    (I am assuming three buttons, and these three languages... you could have 36 different buttons and languages, of course.)
    The next question is do you need to set up a particular audio stream? if so, I'd add it to the script above as a line before each jump statement.
    Now that you have a value in a GPRM to identify the user choice, you can use it over and over. When you press the 'title' button, point it to a script which does this:
    Jump EnglishMainMenu If (GPRM0 = 1)
    Jump FrenchMainMenu If (GPRM0 = 2)
    Jump SpanishMainMenu IF (GPRM0 = 3)
    Of course the name of your menus will be different, just select the correct one when writing the script.
    Now for the menu call - this is assuming that you have a series of sub menus within each language choice. All I would do is set another GPRM each time I go to a different menu. So, assuming we are on the main menu for English and want to go to a chapter selection menu in English, I would go via another script:
    mov GPRM1, 1
    Jump EnglishSubMenu
    For each other menu I would go via a similar script but set a different value each time. That way we know the language (value in GPRM0) and the correct menu (in GPRM1)
    The menu call goes to this script:
    goto 4 If(GPRM0 = 1)
    goto 7 If(GPRM0 = 2)
    goto 10 If(GPRM0 = 3)
    Jump EnglishSubmenu If(GPRM1 = 1)
    Jump SecondEnglishmenu If(GPRM1 = 2)
    Jump AnotherEnglishMenu If(GPRM1 = 3)
    Jump FrenchSubMenu If(GPRM1 = 4)
    Jump SecondFrenchMenu IF(GPRM1 = 5)
    Jump ThirdFrenchMenu If(GPRM1 = 6)
    Jump SpanishSubMenu If(GPRM1 = 7)
    Jump SecondSpanishMenu If(GPRM1 = 8)
    Jump ThirdSpanishMenu If(GPRM1 = 9)
    The goto commands are looking to see which language you are in and the jump commands take you to the correct menu as long as you set these values up when you moved between the menus. This entire script could be simplified further, but as it is it serves to illustrate the process you need to go through.
    There we have it, two main scripts and a bunch of stand-alone scripts to set values... you will be able to easily stay within a branching menu system for a single language with this.

Maybe you are looking for