xboxscene.org forums

Pages: 1 2 [3] 4 5

Author Topic: ActionScripting Questions  (Read 1187 times)

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #30 on: October 18, 2003, 11:35:00 AM »

BJ, Is there anyway to dynamically call a variable? (use of compound variables)

For instance:
If i have variables   IP1 IP2 IP3 IP4 and IP5

and i want to obtain the values of these variables by using a loop counter

:LOOP
ADD Loopcount 1

SET NEWIP IP%Loopcount%

GOTO LOOP


IF I Use %NEWIP% I get "IP1" as a value of NEWIP   where i really want to get the value of IP1

Any way to do this?
Logged

firefucker

  • Archived User
  • Sr. Member
  • *
  • Posts: 319
ActionScripting Questions
« Reply #31 on: October 18, 2003, 02:56:00 PM »

2 quick questions:
How can I check if a file exists?
like in DOS

if exist <file> goto bla
do something
:bla
so something different
???
---------------------------
How can I setup a new unformated drive with MxM? Is there an option like in evox
'configsector' ??

thX
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #32 on: October 18, 2003, 03:06:00 PM »

QUOTE (firefucker @ Oct 18 2003, 11:56 PM)
Quick qusestion:
How do I check if a file exists?
like in DOS

if exist <file> goto bla
do something
:bla
so something different
???


SETFUNC SKINDIR FileExists "c:\\mxmskins"
IF# %SKINDIR% == 0 GOTO CREATESKINDIR
IF# %SKINDIR% == 1 GOTO MainAllowVideoSound




Nevermind about the "compund variables" BJ.   I found a way around it and can now load the current system IP into the script....and change it smile.gif
Logged

firefucker

  • Archived User
  • Sr. Member
  • *
  • Posts: 319
ActionScripting Questions
« Reply #33 on: October 18, 2003, 05:14:00 PM »

CODE

ERROR (setfunc) Unknown function C:evoxdash.xbe


maybe missing quotes ?
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #34 on: October 18, 2003, 05:40:00 PM »

smile.gif

oh.. i will re-edit.  Im looking for the folder in the directory mxm is running from so i actually dont give the full path.

with a full path you need to use quotes and double up on the \

I fixed the previous example.. again
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #35 on: October 18, 2003, 05:46:00 PM »

im almost always hanging out in #mxm on efnet (irc).  so if you know what im talkng about.. your welcome to join.. things could be discussed more rapidly there.

Problems, cool shit, or just helpful hints should still be posted here too though.

Logged

firefucker

  • Archived User
  • Sr. Member
  • *
  • Posts: 319
ActionScripting Questions
« Reply #36 on: October 18, 2003, 06:25:00 PM »

smile.gif
c u
need to sleep now, it's 4:19 AM    ohmy.gif
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #37 on: October 18, 2003, 09:11:00 PM »

smile.gif

Do DBZRacer and I win a prize for the longest ActionScript? Like a year subscription to the MXM forum or something?
Logged

firefucker

  • Archived User
  • Sr. Member
  • *
  • Posts: 319
ActionScripting Questions
« Reply #38 on: October 19, 2003, 03:08:00 AM »

*arg* the s**** doesnt work, again ERROR blabla

another question: How can I delete not empty folders

chmod 777 C:bla
rmdir c:bla

doesnt work. what does cascade mean in:
RmDir <PATH> <CASCADE>
Logged

thetruethugg

  • Archived User
  • Sr. Member
  • *
  • Posts: 432
ActionScripting Questions
« Reply #39 on: October 19, 2003, 03:11:00 AM »

It's the same as a recursive operation.  It goes into all subdirectories and shit.
Logged

firefucker

  • Archived User
  • Sr. Member
  • *
  • Posts: 319
ActionScripting Questions
« Reply #40 on: October 19, 2003, 04:15:00 AM »

ok.But how do u use it?
rmdir C:bla cascade
?????
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
ActionScripting Questions
« Reply #41 on: October 19, 2003, 05:09:00 AM »

QUOTE (firefucker @ Oct 19 2003, 08:15 AM)
ok.But how do u use it?
rmdir C:bla cascade
?????

CODE

rmdir C:\blah 1


Most parameters will accept a "1" as  true condition.
Logged

firefucker

  • Archived User
  • Sr. Member
  • *
  • Posts: 319
ActionScripting Questions
« Reply #42 on: October 19, 2003, 05:15:00 AM »

Ahh! ThX.

like:
RmDir <PATH> <0|1>

I just didn't know how to interprete <CASCADE>.....
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #43 on: October 20, 2003, 01:24:00 PM »

well, i think after reading BJ's actionscript clinic again and again, the newuser.xas will need to be updated one more time. Simply to change the newsfeed username to "User1"

The reason behind this is to be able to look for mulitple newsfeeds during a config edit and be able to save the same info back to the mxm.xml.  BJ explains it quite thoroughly and so the change is needed.

The need for this goes beyond editing the current settings though.  Once the "download from web" function is in place and working fine. I want to be able to create a script that will download newfeed scripts from AXS and add the newsfeed to the current xml file.  As well as a newsfeed removal script.

In order to do this.. the node name has to be standardized for the script to work and staying with UserXX is the most logical answer.

So I will edit the file once i get home and post the newer version.  Ill edit this thread once its done.


anyone have some scripts they are working on?  ideas of some to be made?  the forums are a little skimpy on this topic which is really suprising to me because of the power BJ has given the users to create their own "utilities".

Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #44 on: October 24, 2003, 10:36:00 AM »

hrmm. ok BJ, I started working on the fix date script a minute ago and a problem hit me.


mxm only reports the year in 2 digit format.

the display of the date can be changed by the user to be a number of different ways:   yy/mm/dd  or mm/dd/yy

I was going to use SETFUNC CurrentYear Right 4 $date$  to get the year (i know i must use Right 2 for now)

This poses a couple problems.

1.  I dont know which section might contain the year.
2.  I was needing the long year to check the first digit of the year for a 2, to see if it was invalid.   So if a box had 8907 (or whatever the year was)  the user could be prompted to fix the date.   if it was 2040, or 2004 or 2003 ..then it wouldnt.


Is there any way to pull the full date from the box without the mxm mods to two digit format..and always in the same display format?    so i could expect  $realdate$ to always display mm-dd-yyyy


well.. for the next few years i can check jsut for the right digit of 8907   and if its 7, then its invalid.
but the user will have to know/remember/leave the year to mm-dd-yy format, or it will be an AFu script for now.
Logged
Pages: 1 2 [3] 4 5