Jump to content


Photo

Search For Xbeid


  • Please log in to reply
19 replies to this topic

#1 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 14 November 2003 - 04:29 AM

How would I do a wildcard search for a specific XBEID and return the path to the xbe? I want this for my "Delete XBMP/C save and launch" script. I feel it would be done the easiest by searching for the specific XBEID (for the user at least), and returning the path, so it knows where the file is, to launch it.

I'm having quite a hard time trying to figure out a way to do this. It's confusing the fuck out of me sad.gif

Edited by thetruethugg, 14 November 2003 - 04:49 AM.


#2 geniusalz

geniusalz

    Team MXM

  • Head Moderators
  • PipPipPipPipPip
  • 1,827 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 14 November 2003 - 05:00 AM

I guess you'll have to search all directories/subdirectories. Check all files' XBEIDs. And launch the one whose XBEID matches.

I'm afraid there's no easy way to do this.

#3 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 14 November 2003 - 05:04 AM

Yea, I know there's no easy way. I'm just having a hard time figuring out the code to make this work. I guess I should have said that.

EDIT: Nevermind (for now), I think I'm starting to get it to work, I haven't tested it yet though, it just looks like it *may* work.

EDIT2: Ok, here's the code I've come up with so far, I don't know if it works, I don't know that I'll get to test it out till tomarrow or so:

CODE
:XBMC
BEGINSEARCH *
:TOP
SEARCHITEM XBE
SETFUNC XBMCID XBEID %XBE%
IF %XBMCID% == "0face008" GOTO GETPATH
IF %XBMCID% != "0face008" GOTO DOAGAIN
GOTO DONESEARCH

:DOAGAIN
SEARCHNEXT
GOTO TOP

:GETPATH
BeginDraw UseCurrent
MessageBox "TEST:  %XBE% and %XBMCID%$eol$$eol$BLACK to exit"
INPUT
IF %_GP_BLACK% == "1" GOTO DONESEARCH
EndDraw

:DONESEARCH
ENDSEARCH

Edited by thetruethugg, 14 November 2003 - 11:41 AM.


#4 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 14 November 2003 - 12:34 PM

you might be able to use the cache_menu.xml to do this.

The nodes arent indexed so it might not be easy... ill try out some code this weekend and let you know if i come up with anything workable.

#5 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 14 November 2003 - 12:47 PM

Thanks man. I was originally thinking about that. But, I don't know how to make it work for people like me that don't use auto-menu, well, and I suck at this action scripting, so I really just kinda started throwing shit together, and this is what I've come up with.

#6 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 15 November 2003 - 06:47 AM

Eh, nevermind the XBEID for XBMC being '0face008' that's just the folder the saves are in (which, I thought that was done by XBEID, guess not though). Luckily, I checked the cache menu, and found out it's actually '262987784', that should make things go a little bit smoother.

#7 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 15 November 2003 - 06:54 AM

CODE
But, I don't know how to make it work for people like me that don't use auto-menu


It shouldnt really be an issue since you still must have the basics in your custom menu for it to work too.

Im making a script that will let you browse your cache file and change game/app titles now that kthulu has his keyboard script finished.

Since I was working with it and had to get the search pattern down right (thanks for the bugfix geniusalz:)) I figured I would go ahead and write this up.

You will need to edit the first line in the script to point to your cache_menu.xml file unless yours is on C:\ by default.

The only problem that this script will have is if you go through two submenus to get to your players. (ie: main menu->apps->media players->xbmp)

Thats the next fix I will be working on before i go ahead with the editing of game titles.

Anyway, the script searches your menu.. and checks the xbeid from the xbe file location itself and not the cache_menu entry for it. If found, it offers to delete the saves adn launch the app, skip or quit. So custom menus shouldnt be a problem unless its the problem i previously mentioned.

Its set up for XBMC and XBMP and tested fine on my box.

You can get it HERE... let me know if it works out fine for you.

#8 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 15 November 2003 - 06:59 AM

Yea, after I posted the "But, I don't know....." crap, it occured to me you could also search for XBEID still, too lazy to edit. wink.gif As for your script, I'll test it when I can, sounds nice though, with this I may just switch to auto-menu, because I'll be able to edit name from MXM and such. I still think I'll finish mine, though your's will be far more superior, just to get some experience and a sense of completion (something I rarely do).

#9 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 15 November 2003 - 07:06 AM

oh yea.. i highly recommend you finish yours. I dont ever mean to "squelch" anyone by doing a script and the ones i do are by no means the best ... which is why is was excited to see kthulu make up a better text editing script.

im doing them to learn too... i would rather they help someone along to get a better understanding of actionscripting... than to be used as the answer. Either way is a win for the person that wanted it... and gives me a little more experience doing different things.


#10 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 15 November 2003 - 08:58 AM

Yea, I know you don't mean to "squelch" (wtf?, lol), I was just saying. On a side note, mine freezes MXM me thinks, to test this I've added output so I know if it's searching or it just actually froze. Another side note (or more accuratly a question), do you know if I can use two wild cards in the search? Something like *App*, so it only bothers to look in directory's containing the letters 'app' in them.

#11 koldfuzion

koldfuzion

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,480 posts

Posted 15 November 2003 - 03:47 PM

no i dotn think you can..but i could be wrong.


You could use a if "%s_name%" #^ "app" GOTO APPSDIRFOUND though. So if a dir contains app it will search it, otherwise it will skip it.

#12 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 15 November 2003 - 04:06 PM

That's the good thing about action scripting, if there isn't a means of doing one thing directly, there's always a work around (I think the more advanced languages do this type of shit for you automatically).

#13 thetruethugg

thetruethugg

    X-S Expert

  • Members
  • PipPipPip
  • 638 posts
  • Xbox Version:v1.0

Posted 17 November 2003 - 05:47 PM

Ok, I tested your script and it Doesn't seem to delete and launch, though it does read the cache menu rather nicely. And, and update on mine - It always freezes MXM, but I think I know the problem.

#14 Kthulu

Kthulu

    X-S Freak

  • XS-BANNED
  • PipPipPipPipPip
  • 1,287 posts
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 09 January 2004 - 06:06 AM

@ttt
on the searching for xbeid thing and deleting the xbmp save and then launching...
you could use a context script, then the path would already be available to you as %_GameDir%. to use the SETFUNC ... XBEID function and compare with game save dir, you could use the getHeXbeID.xas script i just posted.

@kf
i've had an idea for awhile on solving the cach-editor search problem, but was trying to wait till i got something else working that would provide an example (may be awhile though) so... how bout mimicking the menu structure in actionscript. only search one level at a time and present the search results as a menu with selectable menu items (kinda like VKB) once an item is selected, it searches down one more level and presents a menu with choices resulting from that search. am i making sense?

#15 Kthulu

Kthulu

    X-S Freak

  • XS-BANNED
  • PipPipPipPipPip
  • 1,287 posts
  • Xbox Version:v1.0
  • 360 version:unknown

Posted 09 January 2004 - 06:10 AM

or you could put the script in like this...
QUOTE

<item>
<dir>F:HDDLOADERProject Gotham Racing 2</dir>
<action>
SETFANSPEED whatever (10-50, i think)
EXEC "F:\HDDLOADER\Project Gotham Racing 2\default.xbe" (Might wanna check on the use of backslashes inside qoutes, i think u have to double them up)
</action>
<title>Project Gotham Racing 2 (PAL)</title>
<media>F:MXM Video Previewst_projectgothamracing2.wmv</media>
</item>

i bet the %_GameDir% is useable in there, but maybe not...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users