xboxscene.org forums

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

Title: Action Menus, Install Discs, And More...
Post by: BenJeremy on September 07, 2003, 04:47:00 PM
Yes, 0.9n.5 will be out soon. I have added enough functionality that complex actions can be performed. I have tested the ability of MXM to handle multi-line action sequences...

In the <Item> node, instead of having an <Exe> tag, you would instead have an <Action> tag, along with the list of commands. There are no variables or conditional statements yet.

You could make a simplified version of Slayer's Disc with:

<Action>
FORMAT C:
FORMAT E:
FORMAT F:
FORMAT G:
COPY D:CDrive C:
COPY D:EDrive E:
COPY D:FDrive F:
COPY D:GDrive G:
</Action>

This action seqence, of course, would format all of the drives and copy over data from the disc to the hard drive. I will likely add some simplified GUI operations, as well.


  • RESETMENUCACHE
    Basically just deletes the menu cache

  • TRAYOPEN
    Opens the CD tray

  • TRAYCLOSE
    Closes the CD Tray

  • REBOOT
    Reboots the machine

  • SHUTDOWN
    Turns the power off

  • POWERCYCLE
    Powers on then off

  • FORMAT <Drive>
    Formats the hard drive (requires the user to change a menu item first!!)

  • ATTR <FileOrDir> ro|rw
    Enables the Read Only attribute to be set or reset

  • CHMOD 777 <FileOrDir>
    Similar to ATTR, used for FlashFXP

  • LaunchDVD
    Launches any Xbox game in the DVD drive

  • EEPROMBackup [Filename]
    Copies the contents of the EEPROM to a file, encrypted

  • EEPROMRestore [Filename] (Restores EEPROM contents, encrypted, from a file, file defaults to "eeprom.bin" in current directory)
    Copies the contents of an file to the EEPROM, file data mnust already be encrypted

  • MKDIR <PATH>
    Makes a directory

  • RMDIR <PATH> <CASCADE>
    Removes a directory. <CASCADE> must be Yes or True for command to handle non-empty directories.

  • CD <PATH> (GUI only, sets default directory, which starts as MXM's path)
    For menu actions, this is used to set a directory "placeholder"

  • COPY <Path/File/Wildcard> <Path/File>
    Copies files or directory contents

  • RENAME <FileOrPath> <FileOrPath>
    Renames a file or path

  • DELETE <File>
    Deletes a file
  • Title: Action Menus, Install Discs, And More...
    Post by: moowear on September 07, 2003, 06:06:00 PM
    Awesome BJ, i'm looking forward to this "Disc-it-once-and-for-all" solution to putting MxM onto newer/larger hd's from the go.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 07, 2003, 05:05:00 PM
    QUOTE (moowear @ Sep 7 2003, 08:55 PM)
    Awesome BJ, i'm looking forward to this "Disc-it-once-and-for-all" solution to putting MxM onto newer/larger hd's from the go.

    Yes, I was hoping to get the BASIC intepreter integrated before too long, but that's coming. I'll probably add a <BASIC> tag for little menu-driven Basic apps. All of the "Action" script commands will be available through that.

    I'm also going to add some intereactivity via GUI and input.... but that's still not there yet.
    Title: Action Menus, Install Discs, And More...
    Post by: yourwishismine on September 07, 2003, 07:25:00 PM
    How about an option to turn off the internal 'Y' on the joystick that brings up the system menu... This makes me a little leary of allowing my girlfriends 5 year old to play un-supervised... he's push button happy... lol.. but loves to play the games... turning off that menu would be great...

    This post has been edited by yourwishismine: Sep 8 2003, 02:26 AM
    Title: Action Menus, Install Discs, And More...
    Post by: geniusalz on September 07, 2003, 06:15:00 PM
    Cool. Can't wait for BASIC.  wink.gif
    P.S. Would skins have the ability to use BASIC scripting too?  That would rock.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 07, 2003, 06:21:00 PM
    QUOTE (yourwishismine @ Sep 7 2003, 10:14 PM)
    How about an option to turn off the internal 'Y' on the joystick that brings up the system menu... This makes me a little leary of allowing my girlfriends 5 year old to play un-supervised... he's push button happy... lol.. but loves to play the games... turning off that menu would be great...

    Yes.... I will come up with something soon on that front.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 07, 2003, 06:22:00 PM
    QUOTE (geniusalz @ Sep 7 2003, 10:15 PM)
    Cool. Can't wait for BASIC.  wink.gif
    P.S. Would skins have the ability to use BASIC scripting too?  That would rock.

    Yes, I plan on supporting BASIC in the layouts... imagine a 3-D 3-handed clock displaying the current time biggrin.gif

    Title: Action Menus, Install Discs, And More...
    Post by: botek13 on September 07, 2003, 08:36:00 PM
    BJ, I’m sorry to disturb you. I’m sure your very busy but, I'm sure you've seen our "Wish List" of features. How are you doing on "high priority" items? Which features do you plan on implementing in the next version soon to be released? Which are scheduled to be released down the road? When can we expect to see these new features in MXM? -Thanks
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 07, 2003, 07:35:00 PM
    QUOTE (botek13 @ Sep 7 2003, 11:25 PM)
    BJ, I’m sorry to disturb you. I’m sure your very busy but, I'm sure you've seen our "Wish List" of features. How are you doing on "high priority" items? Which features do you plan on implementing in the next version soon to be released? Which are scheduled to be released down the road? When can we expect to see these new features in MXM? -Thanks

    "When they are done"  huh.gif

    Really, that's the best I can offer. As I have stated many times, I'm taking a slight breather to "revisit" portions of existing code, and updating some of the interfaces - that's part of what happened here - I revisited the FTP server, and had to revamp the "SITE" command interface. Next I will be revamping the HTTP Client ("web client") code, followed by another look at the initialization code, and finally, on the image cacheing and rendering code.

    The last will probably bring native HDTV compatibility into play and clean up a lot of the image handling issues.

    The next lettered version will incorporate the new UI, which will begin a LARGE number of improvements, and that's when MXM will really start to pull away from the pack. wink.gif It will also incorporate the BASIC interpreter and a lot of goodies that just don't work well without a solid UI (need to be able to type in things, handle dialog boxes, etc.)
    Title: Action Menus, Install Discs, And More...
    Post by: koldfuzion on September 07, 2003, 08:14:00 PM
    looking very good and sounding sweeter every time you make a new post.

    we applaud your efforts.. you are definitely DA MAN!
    beerchug.gif
    Title: Action Menus, Install Discs, And More...
    Post by: DBZRacer on September 07, 2003, 11:25:00 PM
    Sweet! Can't wait to try them out in the next release. I know you're going to implement a "BASIC" type compatibility in the future but I was wondering if you could implement something like a "DISPLAYTEXT" action which pops up or displays a short simple message IE: warning messages in an earlier release...
    Title: Action Menus, Install Discs, And More...
    Post by: corkinator on September 07, 2003, 10:46:00 PM
    Sounds awesome, thanks for the news!!
    Title: Action Menus, Install Discs, And More...
    Post by: ub312g0d on September 08, 2003, 07:35:00 AM
    Did bj just say a 3d clock!?! Is that a little hint that a little more than basic scripting is getting added soon?

    Please continue making this the best dash out there bj and thanx for the hard work you've already put into it.
    ALL HAIL BJ!  ALL HAIL BJ!

    This post has been edited by ub312g0d: Sep 8 2003, 02:36 PM
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 08, 2003, 06:37:00 AM
    QUOTE (ub312g0d @ Sep 8 2003, 10:24 AM)
    Did bj just say a 3d clock!?! Is that a little hint that a little more than basic scripting is getting added soon?

    Please continue making this the best dash out there bj and thanx for the hard work you've already put into it.
    ALL HAIL BJ!  ALL HAIL BJ!

    Well, don't know about "soon" - but it's coming.
    Title: Action Menus, Install Discs, And More...
    Post by: Beelzebud on September 08, 2003, 08:15:00 PM
    Sounds good, I can't wait.  smile.gif

    Thanks for all your work so far.  This dash is the best.  I love it.  smile.gif
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 09, 2003, 04:37:00 AM
    QUOTE (Phantasm @ Sep 9 2003, 07:37 AM)
    Hey BJ, Just a quick question for you...In the next release, Will there be a way for me to back up a game in the DVD tray to the HD right in the UI?  Right now I am using BoXPlorer to back up my games, but it would be eaiser if it was an option in the dash itself.  I'd also like the ability to name the directory myself if that would be a possibility.

    Great work as always!

    I'll see about throwing that in there, now that there's a valid COPY Action command.

    Let me cogitate on it a bit... I've got some ideas on how to implement that. wink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: thetruethugg on September 09, 2003, 07:08:00 AM
    What about something like <action>COPY D:\* F:\Game##</action>, and MXM would look at the last number (for instance 01), and know to copy the files from D: to "F:Game02"..
    Title: Action Menus, Install Discs, And More...
    Post by: Schweeze on September 09, 2003, 09:55:00 AM
    it'd be nicer if one could name the game directly before/after you copy it... that way you can keep your stuff straight...

    all these different suggestions show how lazy we really are....  i love it.
    Title: Action Menus, Install Discs, And More...
    Post by: PuddWakkr on September 09, 2003, 04:38:00 PM
    I'm even lazier than you guys tongue.gif . MXM can already look at a default.xbe and read the games name. Can't it look at the default.xbe it's copying and name the folder accordingly.
    Title: Action Menus, Install Discs, And More...
    Post by: oswald on September 09, 2003, 05:27:00 PM
    yeah thats what I was thinking, in the release thread, I proposed a simple two action setup

    MKDIR F:\Games\$CurrentTitle
    COPY D:\ F:\Games\$CurrentTitle
    Title: Action Menus, Install Discs, And More...
    Post by: thetruethugg on September 09, 2003, 05:49:00 PM
    Yea, oswald's got it.  I forgot how XBcopy did things, and how it sucked.  That's why I always used XCommander..
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 09, 2003, 07:17:00 PM
    Well, I may consider having some "environment variables" ala DOS - you set it with a function type argument that would extract the game title from the XBE, for example.

    I haven't had time to work on it tonight, but I might have some time tomorrow to do some things.

    I am also considering some rendering functions for menu ("GUI") actions - rendering a message box, for example, over the previously rendered screen.

    Understand: While the "Actions" are executing from a menu selection, everything is suspended. I have to create a routine to handle looking at the input and one to render some simple elements like message boxes and such.

    It will be very simple - think along the complexity of a DOS batch file... for now. The BASIC actions will be far more complicated, though. In that case, I plan on spawning the BASIC Actions as their own "process", suspending normal input until they finish (but allowing the skin videos and such to continue executing) - they will be able to bring up dialogs and perform other goodies.

    So in the end, there will be two ways to "program" your own menu items: <Action> scripting and <Basic> processes. Basic will be far more powerful... and you'll be able to call "Action" commands from within Basic programs.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 17, 2003, 07:32:00 PM
    OK, Action Scripts now have the power of gamepad input (that support will grow, but for testing and evaluation purposes, just gamepad right now)

    "WIP" beta testers will be able to play with this a bit. More rendering options will also be introduced, so even more powerful scripts will be available.

    I'll probably also add the ability to launch action scripts from files (ala BATCH files).

    To do: The ability to change configuration, menu items, and read/write files using Action Scripting.
    Title: Action Menus, Install Discs, And More...
    Post by: koldfuzion on September 17, 2003, 08:08:00 PM
    QUOTE (BenJeremy @ Sep 18 2003, 04:32 AM)
    I'll probably also add the ability to launch action scripts from files (ala BATCH files).
    .

    the single most important thing you are doing with the kfa action scripting.  damnit BJ.. u R da freakin man!   Imagine a MXM world of script saving to xbox to perform tasks, maybe not on a daily basis.. but to accomplish specific tasks that would normally be a little difficult for the normal user. A simple import.. a complex dash built on simplicity.
    Title: Action Menus, Install Discs, And More...
    Post by: sprkthead2 on September 17, 2003, 10:18:00 PM
    QUOTE (Phantasm @ Sep 9 2003, 12:37 PM)
    Hey BJ, Just a quick question for you...In the next release, Will there be a way for me to back up a game in the DVD tray to the HD right in the UI?  Right now I am using BoXPlorer to back up my games, but it would be eaiser if it was an option in the dash itself.  I'd also like the ability to name the directory myself if that would be a possibility.

    Great work as always!

    I use dvd2xbox it does this already, it automatically does a media check, creates the folder with the name of the game.  You can specify were to save it by modifying the xml file.
    example:
    - <main>
     <dumpdir1>f:games/comics_movies</dumpdir1>
     <dumpdir2>f:games/fighting</dumpdir2>
     <dumpdir3>f:games/misc</dumpdir3>
     <dumpdir4>f:games/racing</dumpdir4>
     <dumpdir5>f:games/shooting</dumpdir5>
     <dumpdir6>f:games/sports</dumpdir6>
     <dumpdir7>g:games</dumpdir7>
     <dumpdir8>e:games</dumpdir8>
     <dumpdir9>f:videos</dumpdir9>

    I categorized my games, this way I can tell dvd2xbox which categorie to copy the games to.  biggrin.gif

    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 03:22:00 AM
    Adding media patching shouldn't be a problem... though it's not in there yet. As ActionScripts are interactive, and include the ability to manipulate environment variables, you should be able to use it to create fairly complex operations, including selecting a "genre" to dump your DVD to.
    Title: Action Menus, Install Discs, And More...
    Post by: DBZRacer on September 18, 2003, 09:22:00 AM
    Hey BJ, is there a check command you can implement to see if there is a valid DVD Game or Movie disk in the drive? Here is a what I have come up with so far in regards to launching DVDs from my XBOX DVD Game list:

    CODE


    BeginDraw UseCurrent
    MessageBox "Press A to Launch DVD Game Title or B to Cancel"
    EndDraw
    Input
    If %_GP_A% == "1" GOTO APRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    QUIT
    :APRESSED
    If DVDCheckHere == "1" GOTO LaunchOK
    If DVDCheckHere == "0" GOTO InsertDisk
    QUIT
    :BPRESSED
    MessageBox "Disk Launch Cancelled"
    QUIT
    :LaunchOK
    LaunchDVD
    QUIT
    :InsertDisk
    TrayOpen
    MessageBox "Please Insert Disk"




    My goal is to create a list of all my XBOX titles on DVD so I can easily see them with previews on my xbox hd as well as maybe my DVD Movie collection in the future.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 10:25:00 AM
    Yes.  wink.gif



    I'm adding more... and keep in mind, all of the text strings available to skinners is available to ActionScripters - for example, using $traystate$ returns the TrayState string, and $dvdtype$ will return what's loaded in the drive. The "Gadget Strings" are pretty powerful, and I can always add more to them as well. Look over the list in the skinners guide and see what you think of that.  biggrin.gif

    I'm expecting you guys to push the envolope and show me some ways you can use what's there, as well as letting me know what enhancements (not vastly huge changes, just small ones) that can be added to support more complex interactions.

    I'll be adding box, line, triangle drawing routines, image drawing, and placeable, attributable text to the BeginDraw/EndDraw functionality as well. It will be simple.... but scripters should be able to get a lot of mileage out of it.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 18, 2003, 11:10:00 AM
    Awesome info BenJeremy.

    Any chance we'll be seeing this today? wink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 11:18:00 AM
    QUOTE (flattspott @ Sep 18 2003, 03:10 PM)
    Awesome info BenJeremy.

    Any chance we'll be seeing this today? wink.gif

    Well, I will be updating the "WIP" tonight with a few more goodies... I just added "CALLFILE <File> <args... >"  which should (untested, as I am at work) allow you to run ActionScripts within ActionScripts - it restores the local environment on return, and passes arguments as well.

    The drawing stuff should be there as well.

    I'd like to add the AutoExec one ("WIP" testers will see a popup when they run MXM, unless they define an AutoExec)

    The more I look at it, ActionScript and BASIC will replace some of the internal things I'm doing right now.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 18, 2003, 11:32:00 AM
    QUOTE
    Well, I will be updating the "WIP" tonight with a few more goodies

    So does this mean that us common folk won't be able to try this out for a while then?
    Just you WIP Beta testers?
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 11:48:00 AM
    QUOTE (flattspott @ Sep 18 2003, 03:32 PM)
    QUOTE
    Well, I will be updating the "WIP" tonight with a few more goodies

    So does this mean that us common folk won't be able to try this out for a while then?
    Just you WIP Beta testers?

    Just those with "WIP" Beta access.

    I have to control the distribution until it's ready for a public release, which will be soon.
    Title: Action Menus, Install Discs, And More...
    Post by: DBZRacer on September 18, 2003, 01:13:00 PM
    Here's the scenario placed in the DVDGameLaunch script:

    CODE



     SETFUNC DVDTitle XBETITLE D:\default.xbe

     BeginDraw UseCurrent
       MessageBox "Checking Disk Status..."
     EndDraw

     GOTO DiskCheck

     :DiskCheck
       TrayClose
       IF %TrayState% <> "CLOSED" GOTO DiskCheck
       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 DiskCheck
         If %_GP_B% == "1" GOTO LaunchCancel
       Quit

     :LaunchCancel
       MessageBox "Disk Launch Cancelled"
       QUIT

     :LaunchDisk
       MessageBox "%DVDTitle% Now Launching"
       LaunchDVD
       QUIT
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 02:01:00 PM
    QUOTE (DBZRacer @ Sep 18 2003, 05:06 PM)
    OK I got a couple more questions. Sorry to ask them now as I'm impatient and trying to play with the scripts at work before I get home to the xbox:

    1. Does the GOTO command have the ability to goto <labels> in the code that were stated BEFORE the actual goto command. IE:

    CODE

    :label1
      commands here
      quit

    :label2
     commands here
     GOTO label1
     quit


    2. A second scenario would be here where I want it to restart the section of script if my condition is not meant


    CODE

    :label1
      commands here
      quit

    :label2
     commands here
     IF ___ <> ___ GOTO label2
     quit

    Yes, ActionScripts are two pass - the first pass gets all of the labels and keeps track of them, then it executes the instructions.


    Looping back is fine. Just don't get it stuck in an infinite loop wink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 02:07:00 PM
    QUOTE (DBZRacer @ Sep 18 2003, 05:13 PM)
    Here's the scenario placed in the DVDGameLaunch script:

    CODE



     SETFUNC DVDTitle XBETITLE D:default.xbe

     BeginDraw UseCurrent
       MessageBox "Checking Disk Status..."
     EndDraw

     GOTO DiskCheck

     :DiskCheck
       TrayClose
       IF %TrayState% <> "CLOSED" GOTO DiskCheck
       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 DiskCheck
         If %_GP_B% == "1" GOTO LaunchCancel
       Quit

     :LaunchCancel
       MessageBox "Disk Launch Cancelled"
       QUIT

     :LaunchDisk
       MessageBox "%DVDTitle% Now Launching"
       LaunchDVD
       QUIT

    Well, give it a shot.... You can always liberally sprinkle in bd/messageboxes/ed/input to check things along the way.

    I may make an internal script to combine the messagebox stuff... just got home.
    Title: Action Menus, Install Discs, And More...
    Post by: macel on September 18, 2003, 02:26:00 PM
    QUOTE (BenJeremy @ Sep 8 2003, 03:47 AM)
    Yes, 0.9n.5 will be out soon.

    That was... 11 days ago.

    Has anyone ever stopped to wonder how much certain groups interpretations of time differ?

    I mean, when I say to my buddies that I'll meet them at the local pub soon, it means that I'll be there in the next, say, 30 minutes.

    Now, when my lovely wife is getting ready for a dinner (or something else that requires special attention to ones appearance) and says that she'll be ready soon, I can relax, flip the box on and finish the season in nhl 2k4.

    Then there are our beloved programmers whose interpretation of the word soon is even more cryptical. 'A new version will be out soon' is probably one of the most feared sentences  coming out from the mouth of a codemonkey, it can mean that he's currently uploading the program to the server or it can mean that the development has been terminated and the monkey is getting wasted as we speak.

    The last group are the game developers.  Sadly they have abandoned the word soon almost completely. The industry standard seems to be 'when it's done' which lacks the charm and warmth of our loved 'soon'.

    And now I have to hurry to pick my aforementioned companion from the station as she is expecting me to pick her up, yes, soon. And if I fail to do so, during the next, roughly, 5 minutes I will most likely become yet another victim of brutal domestical violence.

    Edit: Tried to fix grammar and added some text that got lost
    Edit2: Failed
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 02:33:00 PM
    QUOTE (macel @ Sep 18 2003, 06:26 PM)
    QUOTE (BenJeremy @ Sep 8 2003, 03:47 AM)
    Yes, 0.9n.5 will be out soon.

    That was... 11 days ago.

    Has anyone ever noticed how much certain groups interpretations of time differ?

    I mean, when I say to my buddies that I'll meet them at the local pub soon, it means that I'll be there in the next, say, 30 minutes.

    Now, when my lovely wife is getting ready for a dinner (or something else that requires special attention to ones appearance) and says that she'll be ready soon, I can relax, flip the box on and finish the season in nhl 2k4.

    Then there are our beloved programmers whose interpretation of the word soon is even more cryptical. 'A new version will be out soon' is probably one of the most feared sentences when it comes from the mouth of a codemonkey, it can mean that he's currently uploading the program to the server or it can mean that the development has been terminated and the monkey is getting wasted as we speak.

    LOL.... yeah, well, there were some things I needed to include, but couldn't get the time to include them.

    Really, I'm nearing the end of the "to do" for this upcoming release.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 18, 2003, 04:22:00 PM
    Okay this is what I messed around with;

    CODE

    Test Actions

    Backup EEPROM

    BeginDraw UseCurrent
    MessageBox "This will backup your eeprom$eol$To continue press A$eol$To cancel press B"
    EndDraw
    Input
    If %_GP_A% == "1" GOTO CONTINUE
    If %_GP_B% == "1" GOTO CANCEL
    QUIT
    :CONTINUE
    MessageBox "EEPROM Backed Up!"
    EEPROMBackup
    QUIT
    :CANCEL
    MessageBox "EEPROM Backup canceled by user."
    QUIT



    Restore EEPROM

    BeginDraw UseCurrent
    MessageBox "This will restore your eeprom$eol$To continue press A$eol$To cancel press B"
    EndDraw
    Input
    If %_GP_A% == "1" GOTO CONTINUE
    If %_GP_B% == "1" GOTO CANCEL
    QUIT
    :CONTINUE
    MessageBox "EEPROM Restored!"
    EEPROMRestore
    QUIT
    :CANCEL
    MessageBox "EEPROM restore canceled by user."
    QUIT




    Works nicely. One problem you may want to look into though. When ever I select the action from my menu the soundtrack pauses until I press on a button. This seems to happen a second or so after the message box is drawn.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 04:29:00 PM
    QUOTE (flattspott @ Sep 18 2003, 08:22 PM)
    Okay this is what I messed around with;

    CODE

    Test Actions

    Backup EEPROM

    BeginDraw UseCurrent
    MessageBox "This will backup your eeprom$eol$To continue press A$eol$To cancel press B"
    EndDraw
    Input
    If %_GP_A% == "1" GOTO CONTINUE
    If %_GP_B% == "1" GOTO CANCEL
    QUIT
    :CONTINUE
    MessageBox "EEPROM Backed Up!"
    EEPROMBackup
    QUIT
    :CANCEL
    MessageBox "EEPROM Backup canceled by user."
    QUIT



    Restore EEPROM

    BeginDraw UseCurrent
    MessageBox "This will restore your eeprom$eol$To continue press A$eol$To cancel press B"
    EndDraw
    Input
    If %_GP_A% == "1" GOTO CONTINUE
    If %_GP_B% == "1" GOTO CANCEL
    QUIT
    :CONTINUE
    MessageBox "EEPROM Restored!"
    EEPROMRestore
    QUIT
    :CANCEL
    MessageBox "EEPROM restore canceled by user."
    QUIT




    Works nicely. One problem you may want to look into though. When ever I select the action from my menu the soundtrack pauses until I press on a button. This seems to happen a second or so after the message box is drawn.

    LOL... yes, the music and videos will pause until the script is done. This is unfortunately not going to change soon (I can pump some of this stuff, but there are bad side-effects I need to insure don't happen - plus it greatly increases the difficulty in ActionScript drawing)

    I do plan on fixing it, but for the moment, it's a minor thing.

    Tonight I'll be adding:

       CALLFILE <file> <Args...>
       CALLSCRIPT <name> <Args...>

    as well as a means to define scripts in the MXM.xml file.

    Just a few more drawing commands to wrap up and I'll update the WIP
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 18, 2003, 04:33:00 PM
    And could you clarify what all the EEPROM stuff pertains to. Is (as it is in the WIP) it for NTSC/PAL video and for Locking the harddrive (if you restored an eeprom that was made by configmagic? Or is the locking the HD something else entirely?

    If it isn't, maybe you could add it to your things to do list. Something like HDDLock and HDDUnlock

    Then I can make the ultimate installer/ Recovery disc, seeing how I won't have to rely on any external apps (other then Evox for Flashing BIOS).
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 18, 2003, 04:40:00 PM
    QUOTE
    LOL... yes, the music and videos will pause until the script is done. This is unfortunately not going to change soon (I can pump some of this stuff, but there are bad side-effects I need to insure don't happen - plus it greatly increases the difficulty in ActionScript drawing)

    I do plan on fixing it, but for the moment, it's a minor thing.


    Well if that's the case then I can live with. As you said I wouldn't rush to fix either. You know why? Cause some of the stuff that's possible with ActionScripts can mess up your Xbox,(possibly) The pause of the music will cause users to be a bit more alert as to what there doing. This would be ideal for people who let others use there Xbox. The kind of people that just go and push buttons randomly. unsure.gif

    I think you should leave it as is if it isn't having an affect on the ActionScripts.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 06:00:00 PM
    QUOTE (flattspott @ Sep 18 2003, 08:33 PM)
    And could you clarify what all the EEPROM stuff pertains to. Is (as it is in the WIP) it for NTSC/PAL video and for Locking the harddrive (if you restored an eeprom that was made by configmagic? Or is the locking the HD something else entirely?

    If it isn't, maybe you could add it to your things to do list. Something like HDDLock and HDDUnlock

    Then I can make the ultimate installer/ Recovery disc, seeing how I won't have to rely on any external apps (other then Evox for Flashing BIOS).

    Yes, I intend on adding the HD Lock/Unlock code... after a bit of testing on an old drive, though.

    The PAL/NTSC switching no longer touches the EEPROM. IT should be "safe" in that it's effect is negated as soon as you reboot with a power cycle.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 06:24:00 PM
    Well, the latest is up.... have fun. Besides a few functions for SETFUNC, I don't think I'll be adding too much more for now. I might add an ActionScript.xml to pull in handy ActionScripts, or something similar. Feel free to make suggestions.

    AutoExec action is there... as is the callable scripts.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 18, 2003, 06:47:00 PM
    So then why does one need to back up their there eeeprom then. AFAIK the main thing this would be for would be to have to use in another Xbox if that one get banned from Live. Maybe I just retarded here.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 18, 2003, 06:58:00 PM
    QUOTE (flattspott @ Sep 18 2003, 10:47 PM)
    So then why does one need to back up their there eeeprom then. AFAIK the main thing this would be for would be to have to use in another Xbox if that one get banned from Live. Maybe I just retarded here.

    Well, I added the "Save" and "Restore" EEPROM for good measure.

    It's always good to have a backup.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 03:53:00 AM
    QUOTE (j0hnnyb0y84 @ Sep 19 2003, 01:32 AM)
    I don't know if this has been requested or already has plans on being implemented, but adding left and right D-pad functionality would be useful IMO in the menu options.  I was working on a Dreamcast menu, but I was limited by this.


    Keep up the good work BJ!

    "Horizontal menus" are done using Text Gadgets, instead of menu gadgets. There is a tag to tell MXM that the text block is being used as a menu, and to orient things left/right. The idea was to put conditional arrows on each side, as well. It's not smooth scrolling, which is much more complicated in a horizontal orientation.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 06:49:00 AM
    I was wondering BJ, is it possiblt to add two buttons to a single script section? For example in my EEPROM test script. Obviously backing up wouldn't really need it. But the restoring part could benefit from it. What I want to do is make it so the user (me I suppose) has to push something like white and black at the same time to be able to restore the EEPROM. The would also be ideal for future versions of Media X Menu when you get BIOS flashing working.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 07:12:00 AM
    And another thing, is there a limit that you know of with the ActionScripts. Cause I was dabbling with making a super installer with evox but gave up because it would not reconize any actions over 99. Yes this is a lot of actions but it needed them.  I think I was trying to use somewhere around 180 custom actions. Would that be an issue with MXM? In evox the Actions are numbered so I could have tested it out but using just and an [Action_100] to see that it wouldn't work.

    In MXM though they go into the menu items they're for so they're not numbered, thus making it so I have to actually type out 100 plus actions to see if there's a limit.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 07:14:00 AM
    QUOTE (flattspott @ Sep 19 2003, 10:49 AM)
    I was wondering BJ, is it possiblt to add two buttons to a single script section? For example in my EEPROM test script. Obviously backing up wouldn't really need it. But the restoring part could benefit from it. What I want to do is make it so the user (me I suppose) has to push something like white and black at the same time to be able to restore the EEPROM. The would also be ideal for future versions of Media X Menu when you get BIOS flashing working.

    Well, I need to add functions for readign the state of the ports.... you could do your own input using that.

    I might add a parameter to not wait on input (only do a query of the current state) and give you a variable or two showing what's pressed at the moment. That will give you complete access to all of the raw input.

    I intend to have the Left and Right Triggers work as "shift" keys int he normal scheme, though. The IR remote cannot have "shift" keys, and the keyboard will have the usual suspects (ALT/CTRL/SHIFT).

    I'm still working on the details, but the keys will be user configurable soon, for the regular operation (ActionScripts will be able to Translate what's input using a second step).
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 07:19:00 AM
    QUOTE (flattspott @ Sep 19 2003, 11:12 AM)
    And another thing, is there a limit that you know of with the ActionScripts. Cause I was dabbling with making a super installer with evox but gave up because it would not reconize any actions over 99. Yes this is a lot of actions but it needed them.  I think I was trying to use somewhere around 180 custom actions. Would that be an issue with MXM? In evox the Actions are numbered so I could have tested it out but using just and an [Action_100] to see that it wouldn't work.

    In MXM though they go into the menu items they're for so they're not numbered, thus making it so I have to actually type out 100 plus actions to see if there's a limit.

    ActionScripts in MXM are not numbered. They are named (I'll give you a secret here, too... you can override internal ones by defining your own.), so the only limit is memory.

    As you can see in my examples, CallScript can be very useful.

    If somebody develops a nice installer script, I'll consider adding it to the internal routines.

    My intention this weekend is to have MXM recognize that the hard drive is not formatted, and offer up to install from the disc it's running on. Each partition format should basically ask for confirmation, and that could be done as a generic script that accepts an argument for the drive. Similarly, the restoring of a drive's contents from a directory in the disc would also be part of the routine.

    I think it would be cool to insert a DVD with MXM on it and have it know, without even selecting, that the system needs setup.

    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 07:37:00 AM
    You completly read my mind, I have been thinking the same thing for a while. You put the disc in a with a new or unmodded HD and you get a completly different menu structure than if the box was already modded. It would be a smart disc. So things like formating could be tucked away from the postmod menu after you use the disc the first time but you could still have a option to go back to the clean install menu to do all the dirty stuff.

    QUOTE
    back to the clean install menu to do all the dirty stuff.
    No pun intended.


    And let me get this strait wth the CallScript stuff. Basiccally with these I will be able to use ActionScripts for multiple menu items. Like if I had two Submenus for formating a Retail and an Upgrade HD. I could use one ActionScript to format them both identically (no f partition)even though they're called from 2 seperate menus.?
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 09:43:00 AM
    QUOTE (flattspott @ Sep 19 2003, 11:37 AM)
    You completly read my mind, I have been thinking the same thing for a while. You put the disc in a with a new or unmodded HD and you get a completly different menu structure than if the box was already modded. It would be a smart disc. So things like formating could be tucked away from the postmod menu after you use the disc the first time but you could still have a option to go back to the clean install menu to do all the dirty stuff.

    QUOTE
    back to the clean install menu to do all the dirty stuff.
    No pun intended.


    And let me get this strait wth the CallScript stuff. Basiccally with these I will be able to use ActionScripts for multiple menu items. Like if I had two Submenus for formating a Retail and an Upgrade HD. I could use one ActionScript to format them both identically (no f partition)even though they're called from 2 seperate menus.?

    Yes.

    MXM looks for a
    For example, I internally defined "_DisplayMessageBox" - a script to do all the steps to display a simple message box and await input. Calling it is simple:

    CODE

    CallScript _DisplayMessageBox "The Prompt Message"


    The ActionScript named "_DisplayMessageBox" is loaded in, and the variables %0% (set tot he name of the script) %1% (Set to the first argument) and %ArgCount% (Set to 1, in this case) are added to the local environment... which is NOT cleared when calling scripts... HOWEVER, the local environment is restored after the called script returns (Use the global environment to return values, until I create a better mechanism).

    You could have a dozen menu items calling the same scripts... that's not a problem at all.

    For example:

    In MXM.xml:
    CODE

    :

    CallScript _DisplayMessageBox "Do you want to format %1%?$eol$Press "Y" to proceed"
    IF %_GP_Y% <> 1 goto CancelIt
    BeginDraw UseCurrent
    MessageBox "Formatting %1% Drive$eol$Please Wait"
    EndDraw
    Format %1%
    SET _LastError 0
    CallScript _DisplayMessageBox "Done Formatting"
    GOTO Done
    :CancelIt
    SET _LastError 1
    CallScript _DisplayMessageBox "Operation cancelled"
    :Done

    :


    Then, in your menu item, you might have:

    CODE


    Format F:

    CallScript PromptFormat F:



    Format G:

    CallScript PromptFormat G:




    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 09:58:00 AM
    QUOTE (DBZRacer @ Sep 19 2003, 01:55 PM)
    Great example BJ... I had a hell of a time last night trying to figure out how to use Callscript. This should make things a lot easier.

    My only request right now when you have time would be full examples like what you just did for all the new script commands.  I'm one of those guys who are more visual and reverse engineering code from examples works best for me...  beerchug.gif

    Feel free to post "How do I..." messages here, and I'll try and give concrete examples. Perhaps somebody could begin documenting this into a Scripter's guide?
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 10:34:00 AM
    Oh... and likewise, if you have an idea or have an actual script that would be handy for the "internal" scripts, feel free to post those as well, and I'll include them in MXM.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 10:56:00 AM
    Okay I am pretty clear about all this ActionScript stuff except for one thing. The part you posted %ArgCount%, %1% and %0%. I'm still not 100 percent sure about this part. Could you explain this to me in simple terms.

    I have my thoughts of what they do based your post but I'm still a bit confused.
    _________________

    And could you give an example of how the color names are used.
    Lastly, about the Internal Scripts portion. This would only be of use if say I made a really cool script then MXM would need to be recompiled with it, right? So for the average joe it isn't something to worry about?
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 11:06:00 AM
    QUOTE (flattspott @ Sep 19 2003, 02:56 PM)
    Okay I am pretty clear about all this ActionScript stuff except for one thing. The part you posted %ArgCount%, %1% and %0%. I'm still not 100 percent sure about this part. Could you explain this to me in simple terms.

    I have my thoughts of what they do based your post but I'm still a bit confused.

    %ArgCount% %0% and %1% are environment variables... when you "CallScript" MXM makes a "backup" of the lcoal environment (there are two sets of veriables, local and global), then sets the variables abocve to the appropriate values before launching the called script.

    That means that when your script executes, it will 'inherit' all of the local environment variables set by the parent script, and also know what arguments were passed on the script line. When the Called script exits, the LOCAL environment is restored from the copy we made before launching the called script, which means any changes to the LOCAL variables are lost.

    Global environment variables are any variable that is proceeded by an underscore "_" character... %_GP_A% is an example - all scripts see this regardless. You could return a value from your script by using %_Return% for example.

    All variables do a simple text substitution, so:

    SET TestVar "Some Value"

    Makes %TestVar% equal to "Some Value"...

    and

    SET TestVar "Some %TestVar% Value"

    makes %TestVar% equal to "Some Some Value Value"

    Basically, they can be substituted just about anywhere. Arguments and special tokens can be quoted or unquoted - the parser doesn't care much, except it expects spaces to separate tokens, so if text requires a space, QUOTE IT. If you need to display a percent sign "%", just double it up: "%%" Same goes for the dollar sign "$" - which is used for GadgetString Variables and specials, like $eol$ (End of line)
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 11:12:00 AM
    QUOTE (flattspott @ Sep 19 2003, 02:56 PM)
    And could you give an example of how the color names are used.

    Color Names:

    Currently, I only support a few names, as defined. Text and boxes default to the system colors for message boxes, if they are not specified.

    CODE

    :
    BeginDraw UseCurrent
    Box 100 100 150 100 DarkRed White
    EndDraw
    Input
    :


    This draws a dark red box, bordered by a white line, at X,Y=100,100 and the box is 150 pixels wide, by 100 high (scaled as if in a  640x480 screen)

    In the near future (tonight, maybe?) I'll enhance the colors to accept numbers, both decimal and hex so you can do raw ARGB as well.


    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 11:13:00 AM
    That's what I thought.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 11:14:00 AM
    QUOTE (flattspott @ Sep 19 2003, 02:56 PM)

    Lastly, about the Internal Scripts portion. This would only be of use if say I made a really cool script then MXM would need to be recompiled with it, right? So for the average joe it isn't something to worry about?

    Actually, there is an "initial" list built from the internal.xml file, that is actually included in the MXM default.xbe file, but if you define scripts in the MXM.xml file, you can add to the internally available scripts (or even override already defined ones compiled in).

    So yes, the "average joe" could screw things up. Perhaps I'll come up with something there, but the idea is to be able to expand it downt he road, as you guys think of new things to do.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 11:17:00 AM
    On the Color stuff, can we not put the size stuff? Like so,

    BeginDraw UseCurrent
    Box DarkRed White
    EndDraw
    Input

    Cause how am I spose to know how big the Box needs to be? It seems to me that MXM does a good enough job by itself sizing the boxes to the text.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 11:27:00 AM
    Sorry to bug again but I keep getting ideas and whatnot.

    in the Readme you put Copy <Path/File/Wildcard> <Path/File>---whats the wildcard?
    I understand either you copy a path or just a file but have know clue about the wildcard.

    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 11:41:00 AM
    QUOTE (flattspott @ Sep 19 2003, 03:17 PM)
    On the Color stuff, can we not put the size stuff? Like so,

    BeginDraw UseCurrent
    Box DarkRed White
    EndDraw
    Input

    Cause how am I spose to know how big the Box needs to be? It seems to me that MXM does a good enough job by itself sizing the boxes to the text.

    It's:

    BOX <Left> <Top> <Width> <Height> [<Fillcolor> [<BorderColor>]]

    The colors are the only optional parts.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 11:42:00 AM
    QUOTE (flattspott @ Sep 19 2003, 03:27 PM)
    Sorry to bug again but I keep getting ideas and whatnot.

    in the Readme you put Copy <Path/File/Wildcard> <Path/File>---whats the wildcard?
    I understand either you copy a path or just a file but have know clue about the wildcard.

    COPY D:\IMAGES\*.jpg E:\Media\Images\

    Copies only Jpeg files over... wildcards are "*" or "?" - just like the old DOS commands used to take.

    COPY D:\IMAGES\ E:\Media\Images\

    Copies the contents of the IMAGES directory over completely, including subdirectories.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 12:09:00 PM
    Fantastic.

    At this very moment I am working on an installer script. And I was thinking of having the folders on the disc be in a certain way, like APP_01 through APP_xx and so on for the everything else.

    Now could I do a FILEEXIST with a wildcard, like IF FILEEXIST D:\APP_01\*.*  ?

    The purpose would be to copy to contents of the folder only if there's is files in it. Whereas if there's not, it's ignored. This is cause some people will want to install all apps like older ones and whatnot but some people won't.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 12:21:00 PM
    Hey DBZRacer, I just noticed we both signed up a few days a part. Niffty huh?
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 12:36:00 PM
    Here's another one for you BJ.

    I was going over the internal.xml and was wondering...

    is there any chance you could add to the autodir section so theres other options then apps and games/hddloader? I was thinking thoughs as well as dashes and emus.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 12:45:00 PM
    QUOTE (flattspott @ Sep 19 2003, 04:09 PM)
    Fantastic.

    At this very moment I am working on an installer script. And I was thinking of having the folders on the disc be in a certain way, like APP_01 through APP_xx and so on for the everything else.

    Now could I do a FILEEXIST with a wildcard, like IF FILEEXIST D:APP_01*.*  ?

    The purpose would be to copy to contents of the folder only if there's is files in it. Whereas if there's not, it's ignored. This is cause some people will want to install all apps like older ones and whatnot but some people won't.

    No, FileExists doesn't support wildcards (only Copy).

    Perhaps another function is in order to check to see if a path is empty or not?
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 12:47:00 PM
    QUOTE (DBZRacer @ Sep 19 2003, 04:17 PM)
    QUOTE (BenJeremy @ Sep 19 2003, 12:42 PM)
    QUOTE (flattspott @ Sep 19 2003, 03:27 PM)
    Sorry to bug again but I keep getting ideas and whatnot.

    in the Readme you put Copy <Path/File/Wildcard> <Path/File>---whats the wildcard?
    I understand either you copy a path or just a file but have know clue about the wildcard.

    COPY D:IMAGES*.jpg E:MediaImages

    Copies only Jpeg files over... wildcards are "*" or "?" - just like the old DOS commands used to take.

    COPY D:IMAGES E:MediaImages

    Copies the contents of the IMAGES directory over completely, including subdirectories.

    I had a similiar question in regards to the wildcard as well. Actually I have 3.

    1. Can you use the copy command to rename the file in its final destination?

    as in:

    COPY D:IMAGESMXM.JPG F:MEDIAIMAGESMXM2.JPG


    Yes.


    QUOTE

    2. Are wildcards only accepted in the COPY command at this time? I think it would be helpful to have wildcards accepted in the Delete command as well:

    DELETE F:MEDIAVIDEOS*.jpg



    Not handling them with delete.... I have to think about that a bit.


    QUOTE

    3. Is there a way to enable the COPY command to search recursively within a folder to search its subfolders? So for example:

    COPY F:Media*.JPG F:PICS -S

    This would copy all jpegs in the media folder and subfolders into a new folder called pics


    Not with wildcards, yet.

    Man, you guys just don't let a guy rest....  ohmy.gif
    Title: Action Menus, Install Discs, And More...
    Post by: KAC on September 19, 2003, 01:15:00 PM
    jester.gif

    ...now if only my 300GB hard drive got here already, damn UPS guy!!!

    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 01:48:00 PM
    blink.gif

    DBZRacer, as for the installer script. It's coming along.  Right now it is two step thing cause I have to figure out the base foundation for the director structure on the disc.
    When I'm done you'll be able to choose one of 4 IP configurations (DHCP, 192.168.0.3, 192.168.1.3, 192.168.100.3). Install MXM as you main dash and any of the others as your secondary dash. There will also be and option to install X Selecter as your Main dash if you choose to use it. It will also have and exploit managent option just incase you feel like using them, (install/remove/restore) You will will have the ability to install individual apps, emus and dashes(as apps) or all all of them at once. Everything will be preconfigured to use the drive you select. All this including any niffty additional scripts I figure out and more is what I'm planning.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 02:38:00 PM
    I'm thinking of one last set of additions:


    File Access:

    OPEN <WRITE|READ> <HandleName> <FileName>
    WRITELINE <HandleName> <Text>
    READLINE <HandleName> <VarName>
    STATUS <HandleName> <VarName>
    CLOSE <HandleName>


    XML Access:

    XMLOPEN <HandleName> <FileName>
    XMLCLOSE <HandleName>
    XMLCREATE <HandleName> <MainNodeName>
    XMLSAVE <HandleName> [<FileName>]
    XMLSETNODE <HandleName> [<Node> [<Index>]]
    XMLSETELEMENT <HandleName> <Element> <Index>
    XMLGETELVALUE <HandleName> <VarName> [<Attr>]
    XMLSETELVALUE <HandleName> <Text> [<Attr>]
    XMLGETATTRVALUE <HandleName> <VarName> <Attr>
    XMLSETATTRVALUE <HandleName> <Text> <Attr>

    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 03:14:00 PM
    Here's another one BJ. Is it possible to use the text color in conjunction with the FileEXISTS...Nevermind don't answer that. I think I try it myself and see what happens. The reason I wanted to know was to see if we could have an evox-like feature where menu entries that have no actual file could be a different color. But like I said I'll try it out myself.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 04:26:00 PM
    Okay, I don't know if this is problem or what but it seems like result MessageBoxes can only be one line cause thats what's happening even though I am using the $eol$.
    Meaning --
    If %_GP_A% = "1" GOTO A
    :A
    MessageBox "Line One$eol$Line Two"
    QUIT

    But this only shows Line one.

    Another thing is I can't get any text of any sort to change color.
    Title: Action Menus, Install Discs, And More...
    Post by: geniusalz on September 19, 2003, 04:37:00 PM
    QUOTE (BenJeremy @ Sep 19 2003, 06:38 PM)
    I'm thinking of one last set of additions:


    File Access:

    OPEN <WRITE|READ> <HandleName> <FileName>
    WRITELINE <HandleName> <Text>
    READLINE <HandleName> <VarName>
    STATUS <HandleName> <VarName>
    CLOSE <HandleName>


    XML Access:

    XMLOPEN <HandleName> <FileName>
    XMLCLOSE <HandleName>
    XMLCREATE <HandleName> <MainNodeName>
    XMLSAVE <HandleName> [<FileName>]
    XMLSETNODE <HandleName> [<Node> [<Index>]]
    XMLSETELEMENT <HandleName> <Element> <Index>
    XMLGETELVALUE <HandleName> <VarName> [<Attr>]
    XMLSETELVALUE <HandleName> <Text> [<Attr>]
    XMLGETATTRVALUE <HandleName> <VarName> <Attr>
    XMLSETATTRVALUE <HandleName> <Text> <Attr>

    So is this like sequential files in basic?

    And the xml access can let you customize skins. WOW

    So now we need a variable that holds the Skinspath, or CurrentSkinPath

    Then it's possible to have the user, e.g., switch between newsfeed and song name

    A suggestion:
    Have a "Scripts" folder, and a "Scripts" submenu

    So you can just copy scripts over to the Scripts folder, and run them from the menu.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 04:43:00 PM
    QUOTE (flattspott @ Sep 19 2003, 08:26 PM)
    Okay, I don't know if this is problem or what but it seems like result MessageBoxes can only be one line cause thats what's happening even though I am using the $eol$.
    Meaning --
    If %_GP_A% = "1" GOTO A
    :A
    MessageBox "Line One$eol$Line Two"
    QUIT

    But this only shows Line one.

    Another thing is I can't get any text of any sort to change color.

    It's working fine for me...  just ran a test.

    I'm also adding a ton of new functions for string manipulation, as well as "PathEmpty"
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 05:02:00 PM
    OK, well, more stuff to play with in tonight's release....

    and here's my example code embedded within MXM:

    Box 20 20 100 100 Red White

    Text 25 25 LEFT "Test Text" BLUE

    On my system, it does display blue text, at x=25, y=25, left justified, over a Red box with a White border.

    Press "A" in the Input Test item and you'll see the multiple lines of text work.

    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 05:53:00 PM
    I just tested it and I suppose it's working. The White Border doesn't look like it's there though. But that's probably my crappy tv.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 05:58:00 PM
    QUOTE (flattspott @ Sep 19 2003, 09:53 PM)
    I just tested it and I suppose it's working. The White Border doesn't look like it's there though. But that's probably my crappy tv.

    Yep... that's a bug. I just fixed the code (picking the same argument for both fill and border. Doh!)

    It will work in the next update.

    Come on, guys... tell me what you REALLY need to make these scripts happen, before I retire tonight. I'd like to try this out tomorrow morning.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 06:17:00 PM
    How about this. A sort of "Else If" function for all remaining buttons that aren't defined in the script. That way only the button that's denifing to exit the script will exit the script rather then all the  remaining buttons. If you get what I mean.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 06:28:00 PM
    QUOTE (flattspott @ Sep 19 2003, 10:17 PM)
    How about this. A sort of "Else If" function for all remaining buttons that aren't defined in the script. That way only the button that's denifing to exit the script will exit the script rather then all the  remaining buttons. If you get what I mean.

    Well, it's possible, if lengthy, to do it "manually" - that's something I probably won't change, as I'm trying to keep ActionScripts as simple as possible. It would be a bit of a pain to make it work, anyway....  blink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 06:38:00 PM
    Don't worry about it then cause I figured that would be how I could do it. Lengthiness isn't too big of deal really.

    For another idea how about the is one(if theres not a way to do it all ready)

    You have a something like EEPROMScript.xas

    Inside it you could have way of calling specific things only. Like

    MessageBox 1 "Backed Up"
    and or
    MessageBox 2 "Saved to C:"

    This way even thought both are using the EEPROMBackup we can call the predefined MessageBox if one is prefered over the other without using a multline MessageBox and &eol&. I guess it is kind of pointless but may come in handy.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 07:00:00 PM
    QUOTE (DBZRacer @ Sep 19 2003, 10:51 PM)
    I DL'd the latest WIP and I'm still having problems with the $eol$ commands. Even the initial  "This is a WIP Release$eol$Do not distribute" display box only shows line one for me on startup... I'll play with the scripts again tomorrow when I get back...

    Hmmm.... you are correct. I didn't notice that.

    Strange, but as it's reproducable, I should be able to figure this one out.
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 07:05:00 PM
    Haha, I thought I was doing something wrong. This is happening to me as well.

    Also BJ, on your Input Test menu, I press A then the script starts, I push A again and the red box appears and the message back says A Pressed. Then if I press A again the messagebox changes to;
    Something Line 1 (I forget)
    Second Line
    Third <line>

    However if I press any other button when the red box is visible and the messagebox says A Pressed it goes to the appropriate button pressed messagebox. This only happens with the A Button. I know it's only a test script but still, I thought you'd like to know.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 19, 2003, 07:13:00 PM
    QUOTE (BenJeremy @ Sep 19 2003, 11:00 PM)
    QUOTE (DBZRacer @ Sep 19 2003, 10:51 PM)
    I DL'd the latest WIP and I'm still having problems with the $eol$ commands. Even the initial  "This is a WIP Release$eol$Do not distribute" display box only shows line one for me on startup... I'll play with the scripts again tomorrow when I get back...

    Hmmm.... you are correct. I didn't notice that.

    Strange, but as it's reproducable, I should be able to figure this one out.

    Doh! Hmmm... that was my fault. I updated the Internal.xml, but I didn't process it with the app that converts it into binary loadable formed CPP and H files.  blink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: flattspott on September 19, 2003, 07:17:00 PM
    wink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: theultimatechuff on September 20, 2003, 01:49:00 AM
    Sounds great, looking forward to a public release. Every time I come and read something here I think of an idea only to read on a bit more and see that its been recommended/implemented already. GJ
    Title: Action Menus, Install Discs, And More...
    Post by: DBZRacer on September 20, 2003, 09:26:00 AM
    QUOTE (BenJeremy @ Sep 19 2003, 08:13 PM)
    QUOTE (BenJeremy @ Sep 19 2003, 11:00 PM)
    QUOTE (DBZRacer @ Sep 19 2003, 10:51 PM)
    I DL'd the latest WIP and I'm still having problems with the $eol$ commands. Even the initial  "This is a WIP Release$eol$Do not distribute" display box only shows line one for me on startup... I'll play with the scripts again tomorrow when I get back...

    Hmmm.... you are correct. I didn't notice that.

    Strange, but as it's reproducable, I should be able to figure this one out.

    Doh! Hmmm... that was my fault. I updated the Internal.xml, but I didn't process it with the app that converts it into binary loadable formed CPP and H files.  blink.gif

    sweet!  beerchug.gif glad it's been fixed already. talk about quick turn around time!  beerchug.gif
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 21, 2003, 08:49:00 PM
    Note about scripts and XML....

    When defining a script in XML, be aware that the symbols < and > have special meaning, and should be "escaped" with &lt; and &gt;  or the ActionScript escape sequence, $lt$ and $gt$

    Kinda screwed up my latest scripts  blink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: geniusalz on September 21, 2003, 11:59:00 PM
    Up down left right to move, A to exit

    CODE

    SET YY 100
    SET XX 100

    BLAH:
    Input

    If %_GP_D_LF% == "1" GOTO LF
    If %_GP_D_UP% == "1" GOTO UP
    If %_GP_D_DN% == "1" GOTO DN
    If %_GP_D_RT% == "1" GOTO RT
    If %_GP_A% == "1" GOTO EXIT

    UP:
    SUB YY 5
    DN:
    ADD YY 5
    LF:
    SUB XX 5
    RT:
    ADD XX 5


    BEGINDRAW
    BOX XX YY 10 10 0xFF0000FF 0xFFFFFFFF
    ENDDRAW
    GOTO BLAH

    EXIT:
    QUIT


    Question is:
    Will this work?
    Especially the BOX XX YY part (if the BOX command accepts variable names as arguments) (cant test it myself coz my xbox is with my bro)
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 22, 2003, 03:18:00 AM
    QUOTE (geniusalz @ Sep 22 2003, 03:59 AM)
    Up down left right to move, A to exit

    CODE

    SET YY 100
    SET XX 100

    BLAH:
    Input

    If %_GP_D_LF% == "1" GOTO LF
    If %_GP_D_UP% == "1" GOTO UP
    If %_GP_D_DN% == "1" GOTO DN
    If %_GP_D_RT% == "1" GOTO RT
    If %_GP_A% == "1" GOTO EXIT

    UP:
    SUB YY 5
    DN:
    ADD YY 5
    LF:
    SUB XX 5
    RT:
    ADD XX 5


    BEGINDRAW
    BOX XX YY 10 10 0xFF0000FF 0xFFFFFFFF
    ENDDRAW
    GOTO BLAH

    EXIT:
    QUIT


    Question is:
    Will this work?
    Especially the BOX XX YY part (if the BOX command accepts variable names as arguments) (cant test it myself coz my xbox is with my bro)

    The labels are wrong.... the colon comes first, and you'd need to jump to the drawing part, after performing the location adjustment for each direction:

    CODE

    SET YY 100
    SET XX 100

    :BLAH
    Input

    If %_GP_D_LF% == "1" GOTO LF
    If %_GP_D_UP% == "1" GOTO UP
    If %_GP_D_DN% == "1" GOTO DN
    If %_GP_D_RT% == "1" GOTO RT
    If %_GP_A% == "1" GOTO EXIT

    :UP
    SUB YY 5
    GOTO DRAWIT
    :DN
    ADD YY 5
    GOTO DRAWIT
    :LF
    SUB XX 5
    GOTO DRAWIT
    :RT
    ADD XX 5

    :DRAWIT
    BEGINDRAW
    BOX XX YY 10 10 0xFF0000FF 0xFFFFFFFF
    ENDDRAW
    GOTO BLAH

    EXIT:
    QUIT

    Title: Action Menus, Install Discs, And More...
    Post by: geniusalz on September 22, 2003, 12:56:00 PM
    Cool!

    Thanks for correcting my code biggrin.gif
    The labels I was using is more like VB


    Now for MXM minigame programming  wink.gif
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 22, 2003, 06:32:00 PM
    AARRGGHHHH..... I absolutely HATE debugging in the dark.

    Unfortunately, that's EXACTLY what I'm forced to do at the moment. I've written a basic set of scripts to handle initial prep of a hard drive, when MXM is launched on DVD, if the drive isn't formatted.

    It "mostly" works, but for some bizarre reason, the format isn't working in the script - but it works from the FTP! Same command.

    Anyway, that's the hang up right now... I'm slogging through the code to make sure this thing will work. The bad thing is that there's no debugging involved: I have to run this in release mode, on a CD-RW, in a system that's got a fresh hard drive. The end result is that it takes FOREVER for a debug cycle, and often I get nothing meaningful.

    I'm working hard right now, and few new things will be added before I do the "Bug Fix Release" - so it WILL be out shortly after I solve these current issues.
    Title: Action Menus, Install Discs, And More...
    Post by: BenJeremy on September 22, 2003, 08:38:00 PM
    Ugh. Figured out the problem... testing continues. Hopefully, I'll wrap up tomorrow night. New "WIP" Binaries updated.
    Title: Action Menus, Install Discs, And More...
    Post by: vexx22 on September 28, 2003, 07:49:00 AM
    i tried the code with the box but it was wrong i correct it an it runs cool thing :-)

    <Action>
    SET YY 100
    SET XX 100

    :BLAH
    Input

    If %_GP_D_LF% == "1" GOTO LF
    If %_GP_D_UP% == "1" GOTO UP
    If %_GP_D_DN% == "1" GOTO DN
    If %_GP_D_RT% == "1" GOTO RT
    If %_GP_A% == "1" GOTO EXIT
    Quit

    :UP
    SUB YY 5
    GOTO DRAWIT
    :DN
    ADD YY 5
    GOTO DRAWIT
    :LF
    SUB XX 5
    GOTO DRAWIT
    :RT
    ADD XX 5
    GOTO DRAWIT

    :DRAWIT
    BEGINDRAW
    BOX %XX% %YY% 10 10 Black White
    ENDDRAW
    GOTO BLAH

    :EXIT
    QUIT

    </Action>