xboxscene.org forums

OG Xbox Forums => Official MediaXMenu (MXM) Forum => Dashboard Forums => MXM ActionScripting Forum => Topic started by: BenJeremy on September 26, 2003, 02:12:00 PM

Title: Cool Actionscript Without Function?
Post by: BenJeremy on September 26, 2003, 02:12:00 PM
Well, you could always replace the "LaunchDVD" with "EXEC D:\Default.xbe"
Title: Cool Actionscript Without Function?
Post by: BenJeremy on September 26, 2003, 02:26:00 PM
Oh.... don't get the XBETitle until you know the D:\default.xbe is present. That might be hosing things up.
Title: Cool Actionscript Without Function?
Post by: flattspott on September 26, 2003, 03:14:00 PM
You can have the whole script included in the xml if you want to.
Title: Cool Actionscript Without Function?
Post by: vexx22 on September 26, 2003, 03:20:00 PM
ok i will try but i need to change <> to != its the same but the other don´t run by me and by.  But where do you get the %DVDType% from and your "IF %TrayState% <> "CLOSED" GOTO DiskCheck" is wrong ii think because there is a loop and i only tries to close the tray but he never stops.
Title: Cool Actionscript Without Function?
Post by: BenJeremy on September 26, 2003, 03:23:00 PM
QUOTE (vexx22 @ Sep 26 2003, 07:20 PM)
ok i will try but i need to change <> to != its the same but the other don´t run by me and by.  But where do you get the %DVDType% from and your "IF %TrayState% <> "CLOSED" GOTO DiskCheck" is wrong ii think because there is a loop and i only tries to close the tray but he never stops.

The problem is when you use "<" and ">" in an XML file.... it screws up the parser.

You can substitute $lt$ or $gt$ (Environment substitution variables) or use XML escapes... &gt; and &lt;

It's not a problem in scripts called from external files using CallFile (since they are straight text files)
Title: Cool Actionscript Without Function?
Post by: vexx22 on September 26, 2003, 03:29:00 PM
can somebody give me please a sample what all need to stay in external xml file for actionsript, and how to integrate it in my menu.xml.
Title: Cool Actionscript Without Function?
Post by: DBZRacer on September 26, 2003, 03:32:00 PM
QUOTE (vexx22 @ Sep 26 2003, 04:20 PM)
ok i will try but i need to change <> to != its the same but the other don´t run by me and by.  But where do you get the %DVDType% from and your "IF %TrayState% <> "CLOSED" GOTO DiskCheck" is wrong ii think because there is a loop and i only tries to close the tray but he never stops.

The reason I put that loop in there was to that the tray state has 3 settings. open, init, and closed.

If you pop in your game just before executing the script, it could still be in the "INIT" stage as it is still reading the disk in the tray. The loop is there so that it will make sure that the disk is in a closed position and not init before doing the rest of the other checks.
Title: Cool Actionscript Without Function?
Post by: vexx22 on September 26, 2003, 03:36:00 PM
Yes ok but the problem is that it won´t end thats the i think, but i were do you get  the "%DVDType%" from, what is that for a command?
Title: Cool Actionscript Without Function?
Post by: vexx22 on September 26, 2003, 03:55:00 PM
It Runs, the script runs :-)

Something changed but it runs perfect.

Here is the script.

<Action>
BeginDraw UseCurrent
  MessageBox "Checking Disk Status..."
EndDraw

GOTO DiskCheck

:DiskCheck
  TrayClose
  IF %DVDType% != "GAME" GOTO InsertDisk
  IF %DVDType% == "GAME" GOTO LaunchDisk
  QUIT

:InsertDisk
  BeginDraw UseCurrent
    MessageBox "Please Insert Game Disk$eol$Press A To Continue$eol$B To Cancel"
  EndDraw
  TrayOpen
  Input
    If %_GP_A% == "1" GOTO LaunchDisk
    If %_GP_B% == "1" GOTO LaunchCancel
  Quit

:LaunchCancel
  MessageBox "Disk Launch Cancelled"
  QUIT

:LaunchDisk
SETFUNC DVDTitle XBETITLE D:default.xbe
  MessageBox "%DVDTitle% Now Launching"
  LaunchDVD
  QUIT
</Action>
Title: Cool Actionscript Without Function?
Post by: DBZRacer on September 26, 2003, 04:16:00 PM
Sweet! I'm glad someone was able to find a use for the script! I got the additional tags like dvdtype and traystate from the skinners guide. One thing that I think a lot of people will be overlooking with the new release is the fact that the skinner tags are also available in action scripts! Props once again to BJ for the endless possibilities! beerchug.gif
Title: Cool Actionscript Without Function?
Post by: DBZRacer on September 26, 2003, 06:02:00 PM
"SkinningOverview.doc" in the release rar file you downloaded...

What's the bug you're running into?
Title: Cool Actionscript Without Function?
Post by: vexx22 on September 27, 2003, 07:29:00 AM
i don´t get a check system to work.  something is wrong everytime lock at

"Very Good Dvd Copy Script I Think"

and

"Launch Dvd Script"

they are my first script but they are runing fine. :-)