xboxscene.org forums

Pages: 1 2 3 [4] 5

Author Topic: ActionScripting Questions  (Read 977 times)

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
ActionScripting Questions
« Reply #45 on: October 24, 2003, 10:59:00 AM »

QUOTE (koldfuzion @ Oct 24 2003, 02:36 PM)
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

Sounds like a good idea.... I'll work on putting that into a release possibly for tonight.
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #46 on: October 24, 2003, 11:03:00 AM »

haha you replied the same time i edited.

i can just use the last digit until 2007, if the date they say is returned is somehow the default (invalid) date.

If you get the change added soon though, i will include the change.   gonna work on the 7 for now.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
ActionScripting Questions
« Reply #47 on: October 24, 2003, 11:09:00 AM »

QUOTE (koldfuzion @ Oct 24 2003, 03:03 PM)
haha you replied the same time i edited.

i can just use the last digit until 2007, if the date they say is returned is somehow the default (invalid) date.

If you get the change added soon though, i will include the change.   gonna work on the 7 for now.

Actually, I was thinking, since I'd be digging in there anyway, it might be easiest for me to report current hours, minutes, seconds, day, month and year in separate "specials"

$tm_year$ would equal 2003

$tm_hour$ might report 15 for 3:XXpm

That would eliminate any confusion, right?
Logged

koldfuzion

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

definitely, are you going to leave the current shortdate/short time?  
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
ActionScripting Questions
« Reply #49 on: October 24, 2003, 02:26:00 PM »

QUOTE (koldfuzion @ Oct 24 2003, 05:07 PM)
definitely, are you going to leave the current shortdate/short time?

Yeah, I can put in short forms of the time and date, as well...
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
ActionScripting Questions
« Reply #50 on: November 03, 2003, 04:34:00 PM »

CallContextScript
How is this different from normal CallFile?
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
ActionScripting Questions
« Reply #51 on: November 03, 2003, 04:59:00 PM »

QUOTE (geniusalz @ Nov 3 2003, 08:34 PM)
CallContextScript
How is this different from normal CallFile?

Good question.... It took me a minute to scan the code and figure it out for myself, again.

Context Scripts are scripts that are contained in the menu item's node...

<Item>
<Title>Some Title</Title>
<SomeContextAction>
script code...
</SomeContextAction>
</Scripts>
</Item>


You can use "contextscriptexists" function to see if the script is there inthe currently selected item... (just like "scriptexists" for regular scripts).

Why would you do this?

Take a look at the "__DoLaunchApp" in the internal.xml file. This is how I plan on launching files in the future (hmmm... dunno if I'm doing this already yet  blink.gif ). ContextScripts will allow you to add functionality to items in numerous ways.

My "__DoLaunchApp" was intended to allow the user to have an "OnLaunch" script in their item node so they could prep the app, for example, before launching, if need be.
Logged

fastTOE

  • Archived User
  • Full Member
  • *
  • Posts: 242
ActionScripting Questions
« Reply #52 on: November 09, 2003, 06:49:00 PM »

alright,.... this looked like the right thread to post....
i am VERY new to this action scripting (actually this is my first time to this section of the forum) but it is intriguing to say the least,.... it reminds me of my TI-83 graphing calculator programming days, but on a much larger scale, ofcourse.  anyways, my question to you all is this:  is there a beginners tutorial anywhere just to get me started? i read the two piinned topics on the top of this forum and was slightly confused..... are these scripts that you just put in  you .xml as items? or what,.... so any help would be great,.... sorry if this has been answered hundreds of times or if this is the wrong thread, but if u could just pooint me in the right direction to get me going on this action scriptiing i would be truly in debt to you....
  thanks in advance,
      Loren
Logged

fastTOE

  • Archived User
  • Full Member
  • *
  • Posts: 242
ActionScripting Questions
« Reply #53 on: November 09, 2003, 07:13:00 PM »

ok, i should've just toyed around with it before i posted,... i got the fan speed action script to work, and it makes sense, so that is good.... still any help and pointers would be great, but im going to keep toying with it to see what else i can do.... also, just curious why can you not do other percentages of the fan speed like 75% or 50%... i tried doing this and they all did either 100% or default
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
ActionScripting Questions
« Reply #54 on: November 09, 2003, 07:34:00 PM »

smile.gif
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #55 on: November 09, 2003, 07:49:00 PM »

QUOTE (fastTOE @ Nov 10 2003, 05:13 AM)
ok, i should've just toyed around with it before i posted,... i got the fan speed action script to work, and it makes sense, so that is good.... still any help and pointers would be great, but im going to keep toying with it to see what else i can do.... also, just curious why can you not do other percentages of the fan speed like 75% or 50%... i tried doing this and they all did either 100% or default

you might try this one.. i allow the user to increase/decrease values by 1 or 5.  They arent allowed to go above 50 or below 10.

FanSpeed.xas

I have most of the scripts made (that are publically available) on AXS... and you might find more helpful info on actionscripts at the last link in my signature.
Logged

fastTOE

  • Archived User
  • Full Member
  • *
  • Posts: 242
ActionScripting Questions
« Reply #56 on: November 09, 2003, 08:17:00 PM »

thanks for the advise and the new fan speed script,.... tho i cant get that new one to work... i already posted about that in another topic,... so iwill just thank you here..... "thank you" (for the link and such)

p.s. sorry i posted in the other topic before i read this one, didnt mean to double post sort of thing
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
ActionScripting Questions
« Reply #57 on: November 14, 2003, 08:47:00 AM »

BJ said it's coming.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
ActionScripting Questions
« Reply #58 on: November 15, 2003, 06:38:00 PM »

anybody had any luck getting trigger buttons to work in AS?
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
ActionScripting Questions
« Reply #59 on: November 15, 2003, 06:51:00 PM »

no, its dead.. i tried it.
Logged
Pages: 1 2 3 [4] 5