Jump to content


Photo

What's The Proper Way To Use A Context Script?


  • Please log in to reply
12 replies to this topic

#1 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 26 January 2004 - 02:56 PM

Cause I tried to add the Context section and the location of the xas file to my mxm.xml. It showed the new selection but when I clicked on it, it said file not found. I also tried adding the entire script between the <script> tags and it still says file not found.

#2 Kthulu

Kthulu

    X-S Freak

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

Posted 26 January 2004 - 04:52 PM

don't know if you saw this thread or not...
http://forums.xbox-s...T&f=58&t=130913

it talks about one issue you may be experiencing. you have to setup 3 dummy context scripts before the real ones will show up. BJ may have fixed it already but i bet if you follow the examples in that thread, you'll get it figured out...even if that's not your issue.


#3 Kthulu

Kthulu

    X-S Freak

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

Posted 26 January 2004 - 04:58 PM

...if that doesn't help, post the context script section of your mxm.xml...

#4 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 26 January 2004 - 05:21 PM

Well I can see the new option just fine. However when I select it it says file not found.
I've tried these already.

<Context>
<Item Name="Some Script">
<Mode>HD</Mode>
<script>CallFile C:ScriptsSomeScript.xas</Script>
</Item>
</Context>
-------------and
<Context>
<Item Name="Some Script">
<Mode>HD</Mode>
<script>
BeginDraw
::
Quit
</Script>
</Item>
</Context>



#5 Kthulu

Kthulu

    X-S Freak

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

Posted 26 January 2004 - 06:19 PM

the first example is how i do mine...and it looks fine to my eyes. i don't usually do the <Mode></Mode> stuff tho...so without being able to look at my mxm.xml at home, i'd say...

...try getting rid of the <Mode></Mode> stuff. you're giving CallFile an absolute path to your script anyway. i never really understood the purpose of the <Mode> stuff.

hopefully, someone more sure of themselves will see this and help you before i get home tonight

#6 Kthulu

Kthulu

    X-S Freak

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

Posted 26 January 2004 - 06:27 PM

oh yeah, just for kicks and giggles, go ahead and setup the same script 4 times and see what happens...

<Context>
<Item Name="Some Script">
<Mode>HD</Mode>
<script>CallFile C:\Scripts\SomeScript.xas</Script>
</Item>
<Item Name="Some Script">
<Mode>HD</Mode>
<script>CallFile C:\Scripts\SomeScript.xas</Script>
</Item>
<Item Name="Some Script">
<Mode>HD</Mode>
<script>CallFile C:\Scripts\SomeScript.xas</Script>
</Item>
<Item Name="Some Script">
<Mode>HD</Mode>
<script>CallFile C:\Scripts\SomeScript.xas</Script>
</Item>
</Context>


#7 Unbewoffnet

Unbewoffnet

    X-S Young Member

  • Members
  • Pip
  • 35 posts

Posted 27 January 2004 - 04:19 AM

This may or may not solve your problem: instead of <script>Callfile c:\Scripts\script.xas</script>, try <Action>Callfile ... </Action>. That's how mine are set up, and that seems to work.

#8 Kthulu

Kthulu

    X-S Freak

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

Posted 27 January 2004 - 04:39 AM

he's absolutely right...that is the problem!

i need some glasses smile.gif


#9 Yuyu

Yuyu

    X-S Spirit Detective

  • Moderator
  • PipPipPipPipPip
  • 1,231 posts
  • Location:Belleville, IL
  • Interests:Football (Soccer) ... Umm, Xbox?
  • Xbox Version:v1.1
  • 360 version:v2 (zephyr)

Posted 27 January 2004 - 01:17 PM

QUOTE
i need some glasses  smile.gif


You do realize how many times you repeated his mistake right?
HEHE, I was dong the same exact thing a couple weeks ago helping someone in the #mxm channel. I kept repeating their mistake of <actions> instead of <action>.... needless to say, problem fixed after I saw that... tongue.gif


#10 Kthulu

Kthulu

    X-S Freak

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

Posted 27 January 2004 - 05:39 PM

yeah, i should prolly stop trying to help people since i seem to be error prone, misunderstood, and BLIND smile.gif


#11 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 27 January 2004 - 11:38 PM

Well I've tried like ten different ways and nothing's workin.

I know for a fact that I tried tem way because I made the context menu have ten items. with names like MScript - Script Single (uses <script> tags and \) and MyScript - Action Double (uses <action> tags and \\)I also had other combos too. That way I'd know which one worked. But stil nothing is working.

#12 Unbewoffnet

Unbewoffnet

    X-S Young Member

  • Members
  • Pip
  • 35 posts

Posted 28 January 2004 - 06:06 AM

Do you mind posting the whole <Context> section of your mxm.xml? Offset it with the [code=auto:0] tags, 'cause it makes it a touch easier to read. I think it'll be a bit easier to help if we can see precicely what's going on. And what error messages are you getting? Are you still getting the "file not found" error in every case? Does nothing at all happen? Do the items not even show up in your context menus?

And, because in my case the question that doesn't get asked becauase it sounds dumb is the one that most often produces the answer, are you sure that you've got your filenames all arranged properly? Does the script file name appear precisely in your mxm.xml as it does in c:Scripts? The goofiest errors are always the toughest to track down, so it never hurts to ask. smile.gif

Edited by Unbewoffnet, 28 January 2004 - 06:06 AM.


#13 flattspott

flattspott

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,787 posts
  • Location:Southern California
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 28 January 2004 - 06:53 AM

I don't have the info handy at the moment but i'll post it in the morning. It's 1:00am here




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users