xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Del *.*, Rmdir, Arrays And, other wholesome coding goodness...
SumDumGuy2
post Dec 16 2003, 10:46 PM
Post #1


X-S Enthusiast


Group: Members
Posts: 21
Joined: 10-November 03
Member No.: 73433



Hi All,

I have to tell you. I am pretty excited about ActionScripting. I have been away from the Scene for a long time... about a year. And some serious scripting capability was very high on my wish list when I faded into all work and no play about a year ago... Now I come back and find that Action Scripting is has taken charge and is barrelling down the road like a semi with no brakes... and not only that but it comes in the absolute best looking/most versatile menu system my xbox has ever seen... Wow is that some good stuff...

ok, enough telling you all what you already know (like MXM Rocks!!!), I have a question or two...

First of all, I know I have read this somewhere but I have read so much in the last day and a half that I cant remember half of what I read or where it was. So, does "Del" support wildcards? If not does the "Rmdir" remove only empty folders or will it delete a folder and all of its contents?

Ok, my next question is that, unless I was overlooking it, it did not seem as though ActionScripting supports arrays... I know, I am pushing it aren't I? hehe, but I remember reading somewhere someone was asking about using something like VARNAME%COUNT% for a variable %VARNAME1%, %VARNAME2% and so on. As soon as I saw that I thought "That is not what you need... what you need is an array, %VARNAME%(%Count%)". And arrays are soooo useful... I know, soon I will be asking BJ to implement a full Visual Basic for XBOX... heheh, But seriously, if this is not in there already maybe in a future version? wink.gif wink.gif wink.gif

Another quick question, is the best way to loop through files in a folder to use the BeginSearch Path* and SearchNext functions or is there a better way? If that is the best way how do you tell when you get to the end of the list of files? When SearchItem comes up empty?

Finally, I have never really used XML and I was tempted to do something with an INI file, but I assume from what I have read and from the really good XML support that MXM seems to have, that using XML would be a much better way to go than an INI to store information in files and parse with a ActionScript. Is that correct? or is it 6 of one, half dozen of the other (just a matter of preference) type thing?

I have some ideas but I will save them for another thread...

Thanks in advance,
SDG

Edit: Sorry, just thought of one more for this thread. I have not seen much on where ActionScripts can be launched from... Can you have a regular menu item that looks just like it is a xbe file, with an icon or animation and everything but is actually a script or do they have to be called from somewhere specfici?

Thanks again...

This post has been edited by SumDumGuy2: Dec 16 2003, 10:50 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
geniusalz
post Dec 16 2003, 11:03 PM
Post #2


Team MXM
*****

Group: Head Moderator
Posts: 1827
Joined: 3-January 03
Member No.: 16298
Xbox Version: v1.1
360 version: unknown



No native support for arrays.
But you can use an xml object to work like an array. I won't detail the whole thing here, and its been discussed before.

This is what I used to find the end of search:
CODE

SEARCHTYPE s_type
IF %s_type% == "dir" GOTO DIRFOUND
IF %s_type% == "file" GOTO SKIPFILE
QUIT


XML is better than INI in terms of structure.
More organized, you can say. And u can make a hierarchy in it. eg submenus inside submenus inside menus, without using braces and the like.

Scripts in menus are just like normal items

<Item>
<Media>C:\blah.wmv</Media>
<Thumbnail>C:\blah.jpg</Thumbnail>
and instead of a <Exe>C:\blah.jpg</Exe>, you have
<Action>Callscript C:\blah.xas</Action>
</Item>

Right now there's no drop-in functionality for actionscripts, but there's gonna be some soon.

This post has been edited by geniusalz: Dec 16 2003, 11:04 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
SumDumGuy2
post Dec 16 2003, 11:15 PM
Post #3


X-S Enthusiast


Group: Members
Posts: 21
Joined: 10-November 03
Member No.: 73433



QUOTE
you can use an xml object to work like an array


Excellent... Thanks, I will do a search on that.

QUOTE
This is what I used to find the end of search:...


I am not sure I follow you on your example, but I will throw some small test scripts on the xbox a little later to see if I can get ahold of it...

QUOTE
XML is better than INI in terms of structure.
More organized

QUOTE
submenus inside submenus inside menus


Now that you mention it I can see that being easier... Thanks for pointing it out...

QUOTE
Scripts in menus are just like normal items


Excellent!!! That is perfect...

Thanks again for your help and your quick response...
Regards,
SDG
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
geniusalz
post Dec 16 2003, 11:19 PM
Post #4


Team MXM
*****

Group: Head Moderator
Posts: 1827
Joined: 3-January 03
Member No.: 16298
Xbox Version: v1.1
360 version: unknown



CODE
SEARCHTYPE s_type
IF %s_type% == "dir" GOTO DIRFOUND
IF %s_type% == "file" GOTO FIILEFOUND
QUIT


This just tells it to check the search result type..
If it's a file, goes to whereever you tell it to.
And if it's a directory, goes wherever you tell it to.
But if it's neither, it means you are at the end of the search, so it quits. Again, you can do anything there, if you don't want to quit.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
SumDumGuy2
post Dec 16 2003, 11:31 PM
Post #5


X-S Enthusiast


Group: Members
Posts: 21
Joined: 10-November 03
Member No.: 73433



Ok, Duh... makes perfect sense now... Thanks again...
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 23rd May 2013 - 12:42 PM