xboxscene.org forums

Author Topic: How Do You Execute .xas Files  (Read 97 times)

jinx_removing

  • Archived User
  • Newbie
  • *
  • Posts: 22
How Do You Execute .xas Files
« on: November 23, 2003, 06:38:00 PM »

Hey everyone.

Apologies for the question -- I'm having trouble figuring out how to execute .XAS files.  I wanted to poke around ActionScripting, but can't even get moving... At all. :P  How does one run the testscript.xas

Again, apologies.

Peace.

-Jinx
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
How Do You Execute .xas Files
« Reply #1 on: November 23, 2003, 08:10:00 PM »

you can add a new submenu to your menu.xml and add a menu item to that.

As you can see.. you set everything up just like you would a menu menu entry, except you need to change the <exe> tag to an <Action> tag.

of course, you dont have to use a "callfile" function to get a script running, you could put actionscript code between the <actions> tags and run it straight from the menu.xml itself.

I prefer the way listed below, it allows me to update the script without having to reboot.

(you will need to edit the paths to the files on your xbox and you can remove the media and thumbnail tags if you want)

   <Submenu>
     <Title>Scripts</Title>
     <SortField>Title</SortField>
     <Media>C:\mxmvideos\scripts.wmv</Media>
      <Thumbnail>C:\mxmvideos\folderstuff.png</Thumbnail>
   <item>
   <title>Test Script</title>
   <descr>Use test.xas for testing</descr>
   <Action>Callfile c:\mxmscripts\test.xas</Action>
   <media>C:\mxmvideos\test.wmv</media>
   <thumbnail>C:\mxmvideos\hammertime.png</thumbnail>
   </item>
   </Submenu>


the test.xas file is a simple text document.  You can start by creating a new one in  notepad and pasting the following code and saving as test.xas   then upload to the xbox in the place you reference in the menu item above.

CODE

BeginDraw UseCurrent
MessageBox "Hello  $Name$"
EndDraw
INPUT
QUIT


You can use system vars, internal scripts, environment vars etc... just browse the scripting forum and mxm docs when you are ready to jump in head first.

hope this helped.
Logged