xboxscene.org forums

Author Topic: Simple Launch Disc Code...  (Read 78 times)

quall

  • Archived User
  • Sr. Member
  • *
  • Posts: 411
Simple Launch Disc Code...
« on: October 31, 2003, 03:22:00 PM »

Well, i dont have a Question box, but if you want I can copy/paste my code for launching games by pressing X. Also, it does not freeze if no disk is in the xbox.
Logged

EBear

  • Archived User
  • Full Member
  • *
  • Posts: 100
Simple Launch Disc Code...
« Reply #1 on: November 03, 2003, 03:50:00 PM »

Right now I have X to change the random song... I might use yours untill someone posts on how to do this (I will just use the left thumbstick instead), but I really have my heart set on the question box... it would be nice if a question box could pop up when it recognizes discs as well as when you press left thumbstick. Anyone know this off hand? Anyone else interested in this as much as I am? Please post here if this is something you would want and maybe someone will be generous enough to take the time to figure it out (I cant seem to crack it). Im such a chump... begging for code;p
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #2 on: November 03, 2003, 03:52:00 PM »

ok i will give it ago as it sems interseting
Logged

JbOnE

  • Archived User
  • Full Member
  • *
  • Posts: 242
Simple Launch Disc Code...
« Reply #3 on: November 03, 2003, 04:43:00 PM »

um - have ya taken a look around for such an add on feature or just posted looking for it ?

http://forums.xbox-s...ST&f=55&t=79158

mavmf posted a month ago the code for what ur requesting - seek and ye shall find ;P
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #4 on: November 03, 2003, 04:53:00 PM »

yer that is to stop it auto Launch but i am trying to make mp3 play pictures play and a question box asking for an action
Logged

quall

  • Archived User
  • Sr. Member
  • *
  • Posts: 411
Simple Launch Disc Code...
« Reply #5 on: November 04, 2003, 03:33:00 AM »

CODE
       else if (discType == "Video")
       {
              theLauncherLevel.GoTo();
       }

       else if (discType == "Title")
       {
              theLauncherLevel.GoTo();
       }


and change it to:
CODE
       else if (discType == "Video")
       {
              if (AutoLaunchDVD == "True")
    {
    launch("xboxdash.xbe", "\Device\Harddisk0\Partition2");
    }

 else if (AutoLaunchDVD == "false")
    {
    return;
    }
       }

       else if (discType == "Title")
       {
              if (AutoLaunchGame == "True")
    {
    theLauncherLevel.GoTo();
    }

 else if (AutoLaunchGame == "false")
    {
    return;
    }
   }


Then look for this:
CODE
var use5ButtonMainMenu;
var autoDvdx2;
var dvdx2path;


and place 2 things under it, so it will look like this:
CODE
var use5ButtonMainMenu;
var autoDvdx2;
var dvdx2path;
var AutoLaunchDVD;
var AutoLaunchGame;


Next, find this:
CODE
       function OnYDown()
       {
   TellUser("            DASHBOARD CONTROLSn(A) = Selectn(X) = Start Gamen(Black) = Shutdownn(White) = Reboot", "");
       }


and below it, put this:
CODE
   function OnXDown()
   {
     if (theDiscDrive.discType == "Video")
     {
         EnableInput(true);
         launch("xboxdash.xbe", "\Device\Harddisk0\Partition1\");
     }
     else if (theDiscDrive.discType == "Title")
     {
         EnableInput(true);
         theLauncherLevel.GoTo();
     }
     else
     {
         EnableInput(true);

         if (theDiscDrive.discType == "unknown")
             bShowInvalidDisc = false;
         theMainMenu.GoTo();
         EnableAmbientAudio();
     }
   }



After, save the default.xap and insert it. Then, open up the default.xip/config.xap

Look for this:
CODE
   XBMPpath = "\Device\Harddisk0\Partition1\utilities\DVD-X2\"; // Set path to Xbox Media Player


and place these 2 under it:
CODE
   AutoLaunchDVD = "Fales"; // Set auto launching movies to true/false
   AutoLaunchGame = "False"; // Set auto launching games to true/false


save, insert. This will stop it from freezing when pressing X, and allow you to set auto launch on/off through the config.xap.
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #6 on: November 04, 2003, 03:42:00 PM »

what dash mod are you using coz it is all different so if you can explane what you done it would help
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #7 on: November 04, 2003, 04:37:00 PM »

yer i have 1.1 version aswell but still do not have this feture to work the question box is the easy part
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #8 on: November 04, 2003, 04:38:00 PM »

so do you want it to have a box when you put a cd in the drive to ask you to play the cd or not right
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #9 on: November 04, 2003, 06:40:00 PM »

i know what you mean when you want to leve the keys map how they are
so far the problem is when you press the left thumstick down with out a cd in the drive it keeps frezzing i still am trying to solve this issue
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #10 on: November 04, 2003, 08:14:00 PM »

so far i have got a Message box ay do you want to play a game when you put a game cd in and then you press yes or no is that what you are looking for the code is not complete yet but will be soon
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #11 on: November 05, 2003, 02:58:00 PM »

CODE
   powerofffunctiontext = "Power off Xbox ?";  

and under that put
CODE
   playgametext = "Play Xbox Game ?";
   playdvdtext = "Play DVD Movie ?";
   playaudiotext = "Play Audio CD ?";
   playunknowntext = "Play Unknow Disc Type ?";


Now open Default.xip --> Default.xap
and look for this
CODE
   function OnDiscInserted()

and then inser this all the way to the
CODE
DEF theTranslator Translator
and over write it aswell (makes It easy to do it that way)
CODE
   function OnDiscInserted()
   {
       if (discType == "Audio")
{
 AskQuestion(theTranslator.Translate("n n          " + playaudiotext), "launchaudio()", "", 1);
}



       else if (discType == "Video")
{  
 AskQuestion(theTranslator.Translate("n n          " + playdvdtext), "launchmovie()", "", 1);
}




       else if (discType == "Title")
{  
 AskQuestion(theTranslator.Translate("n n          " + playgametext), "launchdisc()", "", 1);
}



           else if (discType == "unknown")
   {  
     AskQuestion(theTranslator.Translate("n n          " + playunknowntext), "launchunknown()", "", 1);
   }
   }
}

function StartDVDPlayer()
{
   log("Starting the DVD player!");
   theDVDPlayerInline.visible = true;
}

function StartCDPlayer()
{
   log("Should start the CD player now!");
   bGoToCDPlayer = true;
   EnableInput(false); // music.xap will re-enable it again if bGoToCDPlay is true
   GoToMusic();
}

function launchdisc()
{
 if(enablelaunchanim == true)
 {
 launchitempath = "DeviceCDROM0";
 theMusicMenuIn.Play();
 theLaunchItem.GoTo();
 }
 else
 {
 theDiscDrive.LaunchDisc();
                        }
}
               
       function launchmovie()
       {
       if(autoDvdx2 == true)
       {
           if(enablelaunchanim == true)
           {
           launchitempath = dvdx2path;
           theMusicMenuIn.Play();
           theLaunchItem.GoTo();
           }
           else
           {
           launch( "default.xbe", dvdx2path );
           }
       }
       else
       {
       theDiscDrive.LaunchDisc();
               //theLauncherLevel.GoTo();
       }
       }

       function launchaudio()
       {
           if (theMusicInline.visible == false)
           {
               ClosePopup();
               nCurMainMenuItem = 1;   // select music when backing up
               StartCDPlayer();
               return;
           }

           var c = theMusicInline.children[0];

           if (c.theMusicPlayMenu.visible) // We are in the music play menu
           {
               if (c.musicSelect == 0) // Already in audio CD player
               {
                   if (c.bMusicMenuVisible)
                   {
                       c.theMusicPlayMenu.GoTo();
                       c.StartMusicPlayer();
                       c.DoMusicPlayPause();
                   }
                   else
                   {
                       c.DoMusicStop();
                       c.InitPlaylist();
                       c.UpdateTrackList();
                       if (c.visualizerViewpoint.isBound)
                           c.DoMusicPlayPause();
                   }
               }
               else if (c.theMusicPlayer.transportMode != 1) // Let's play the disc if no soundtrack is playing
               {
                   bGoToCDPlayer = true;
                   EnableInput(false);
                   c.theMusicMenu.GoBackTo();
               }
           }
           else if (c.theMusicMenu.visible == true)
           {
               ClosePopup();
               bGoToCDPlayer = true;
               EnableInput(false);
               c.StartMusicLevel();
           }
           else
           {
               ClosePopup();
               bGoToCDPlayer = true;
               EnableInput(false);
               c.theMusicMenu.GoTo();
               }
       }

       function launchunknown()
           {
           if(enablelaunchanim == true)
           {
           launchitempath = XBMPpath;
           theMusicMenuIn.Play();
           theLaunchItem.GoTo();
           }
           else
           {
           launch( "default.xbe", XBMPpath );
}
}
DEF theTranslator Translator

and now it ask you to play the cd or not but still can not get the launch on a push of a button any help would be great enjoy ohmy.gif
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #12 on: November 05, 2003, 03:01:00 PM »

CODE
var powerofffunctiontext;

and put this under it
CODE
var playgametext;
var playdvdtext;
var playaudiotext;
var playunknowntext;


sorry about that
Logged

rjsachse

  • Archived User
  • Full Member
  • *
  • Posts: 128
Simple Launch Disc Code...
« Reply #13 on: November 08, 2003, 02:20:00 PM »

yes i used this version and i think that might be your problem get the patch here at Xbox Dash
Logged