I have a training video in production with three associated 30-sec public service announcements. I'd like the DVD to play one of the three PSAs at random before holding at a Main Menu page for the training.
I'd imagine that you'd want to skip the intro (1st run video), go to a so-called Dummy menu to hold & activate your script,, then set the end action of all 3 PSAs to jump to a transitional video or directly to your desired menu.
It *Might* be easier to flesh out your script in the trial of DVDLab pro & import or copy it into DVDA.
In DVDA4 (Full version -- I'm not sure about the Studio Version), you can add an Introduction Media (make it a black picture, and change its duration to 1 second). Make the End-Action of the Intro-Media link to a PLAYLIST that contains your 3 PSA's. For the PLAYLIST, select the GENERAL button (on the right side), and set its PlayMode to Random (Infinite=No, Count=1). Also change the END-Action for the Playlist to be your Main Menu.
NOTE: it might appear to be random, but after a while, it might show the same order given the same hardware/software playing device...
With DVDA 4 and scripting, maybe - but for your application it may be more hassle than it's worth.
The problem is that very few DVD players implement a true random number generator - and more often then not, if they do, they usually start each DVD inserted with the same seed (which means you get the same sequence). What follows is the VM commands needed for a random number generator, provided by the folks over at the DLP forum. The code generates a random number in the range of 1 to the value in GPRM0, the random number is returned in GPRM0. GPRM5 contains the initial seed and should be maintained across calls. GPRM4 is a scratch register.
Getting a seed is also problematic - some DVD players do not implement counter registers or if they do are very restrictive in how you change the register mode, so you can't just set out a timer and get a seed based on user input. If this were DLP I'd have a menu with multiple cells and cell commands that increment a GPRM, then when the user selected something on the menu I'd capture the GPRM to use as a seed - however, DVDA4 isn't quite there with functionality, so I've no good suggestions on how to get a good seed with DVDA4 yet.