xboxscene.org forums

OG Xbox Forums => Official MediaXMenu (MXM) Forum => Dashboard Forums => MXM WIP Beta forum => Topic started by: flattspott on April 01, 2004, 11:28:00 AM

Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 11:28:00 AM
I'm almost done with my latest and greatest script LIVERemover.xas

The thing is, it'll delete dashupdate.xbe and downloader.xbe just fine. However it refuses to delete the update.xbe files. What gives?

At the end of the script  I added the FileExists variable to a MsgBox to see if MXM was seeing the file. The variable comes up as 1, so it is seeing the file.

This post has been edited by flattspott: Apr 1 2004, 07:31 PM
Title: Delete Command Not Working Right
Post by: tayior7 on April 01, 2004, 01:13:00 PM
maybe try....
CODE

ATTR update.xbe rw
DELETE update.xbe


i think thats right... its been a while since ive actionscript'ed ohmy.gif
Title: Delete Command Not Working Right
Post by: BenJeremy on April 01, 2004, 01:51:00 PM
tayior7 is probably right... try resetting the read-only attribute.

I'll look into making delete (and a few other commands) a bit more tolerant soon.

(Time to call Japan for work  blink.gif  )
Title: Delete Command Not Working Right
Post by: tayior7 on April 01, 2004, 02:55:00 PM
BJ- suggestion for mxm- have the copy command have a feature like
CODE
copy D:\default.xbe E:\blah\default.xbe OR

where it would just automaticaly overwrite the file E:\blah\default.xbe if it exists(OR = overwrite)
its a bit harder to do fileexist, delete, copy biggrin.gif
Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 05:22:00 PM
I'll  try that. ATTR update.xbe rw, or should I use chmod 777?

Also these were really the xbox live xbe file. Casue I deleted them from all my games a long time ago. What I did was renamed a few zip files as placeholders if you will. But still I give that other stuff a try.

As soon as I solve this I'll post it.
Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 04:50:00 PM
QUOTE (tayior7 @ Apr 2 2004, 12:55 AM)
BJ- suggestion for mxm- have the copy command have a feature like
CODE
copy D:\default.xbe E:\blah\default.xbe OR

where it would just automaticaly overwrite the file E:\blah\default.xbe if it exists(OR = overwrite)
its a bit harder to do fileexist, delete, copy biggrin.gif

That wouldn't work cause OR is already a function. Perhaps OW.

Or better yet,

copy D:\default.xbe E:\blah\default.xbe 0 = Skip
copy D:\default.xbe E:\blah\default.xbe 1 = Overwrite
copy D:\Folder\ E:\blah\ 2 = Skip All
copy D:\Folder E:\blah\ 3 = Overwrite all
Title: Delete Command Not Working Right
Post by: tayior7 on April 01, 2004, 05:27:00 PM
yea, what he said ^^^
Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 05:41:00 PM
Still not working

here's a sample

CODE
For i = 0 to 2
  If# %File{i}% == 1 Then
     MsgBox "Live files found$eol$Removing now..." 0 1500
     CD %Path%\%GameName%
     Attr %Live{i}% rw
     Delete %Live{i}%
    ;ChMod 777 %Path%\%GameName%\%Live{i}%
    ;Attr %Path%\%GameName%\%Live{i}% rw
    ;Delete %Path%\%GameName%\%Live{i}%
  EndIf
Next


It's all messed up now only cause I'm trying to get it to work
Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 05:49:00 PM
I just found that this an MXM error, not mine.

originally I had it this way.

CODE

Set Live0 dashupdate.xbe
Set Live1 downloader.xbe
Set Live2 update.xbe


With this, it wouldn't delete the update.xbe

Then I changed it to

CODE

Set Live0 dashupdate.xbe
Set Live1update.xbe
Set Live2 downloader.xbe


And now it's not deleting downloader.xbe

Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 06:35:00 PM
I got it working now,

at the top I have

Set Live0 dashupdate.xbe
Set Live1 update.xbe
Set Live2 downloader.xbe

and later for i = 0 to 2

I changed it to 3, even though there is no 3 and now it works.
Title: Delete Command Not Working Right
Post by: geniusalz on April 01, 2004, 06:54:00 PM
Oh yeah, I've noticed that too.

In c/c++ normally, you have
for(int i = 0; i < 3; i++)

And in BASIC you have the equivalent statement
For i = 0 to 2

So MXM is using the BASIC syntax, but not the way it works
Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 07:17:00 PM
Interesting indeed...
Title: Delete Command Not Working Right
Post by: BenJeremy on April 01, 2004, 07:30:00 PM
Doh!

Well, I'll fix that.... but it might break a few things.

What do you all suggest?



Remember, I'm always up for well thought out, much considered ideas. After all, you guys have done a LOT more actionscripting than I.  blink.gif
Title: Delete Command Not Working Right
Post by: flattspott on April 01, 2004, 08:49:00 PM
Well if it's gonna break a few things, maybe you should leave it.

But I was thing about some IF possibilties. Like,

If %Var% == 1 Set Var2 Value

This way we wouldn't need Then and Elses. Sorta like the If....Goto
Title: Delete Command Not Working Right
Post by: geniusalz on April 01, 2004, 10:11:00 PM
I would say ELSEIF's are more important.  Even though they can be 'simulated' by using lots of ELSE's, you end up with a ton of ENDIF's at the end

IF x == hello THEN
---
ELSE
IF x == blah THEN
---
ELSE
IF blah == blah THEN
---
ELSE
---
ENDIF
ENDIF
ENDIF
Title: Delete Command Not Working Right
Post by: flattspott on April 02, 2004, 06:31:00 AM
You can stack a bunch of Elses like that? I thought when you use Else, it's a either or type of deal. Meaning you only use one.

But now that I thought about it, couldn't all this If, Else, ElseIf and Set stuff be done just as easily through a Switch?
Title: Delete Command Not Working Right
Post by: geniusalz on April 02, 2004, 08:31:00 AM
Not really

Switch doesn't let you do:

if x==1 then
blah
elseif y==2 then
blah
endif

As for the FOR problem, I would say fix it.  It might break a few scripts right now, but will prevent hours of hair-pulling later.