xboxscene.org forums

Pages: 1 ... 4 5 [6] 7 8 9

Author Topic: Share Scripts For Others  (Read 1710 times)

Mordenkainen

  • Archived User
  • Sr. Member
  • *
  • Posts: 447
Share Scripts For Others
« Reply #75 on: October 20, 2003, 07:39:00 AM »

Probably has something to do with the comment BJ made that all other processing halts while an actionscript is running. Whatever updates those strings must also halt!

Morden.
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #76 on: October 20, 2003, 07:51:00 AM »

that was only the case with the first implementation of actionscripts.  Now everything continues running at the same time as the actionscript.   I watch the diskspace dwindle while using a game copy script.. so the dvdtype should be available also.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Share Scripts For Others
« Reply #77 on: October 20, 2003, 08:45:00 AM »

Yes, I should have an "RC" tonight, perhaps.... this weekend I didn't touvch MXM at all - between a busy Saturday and spending Sunday re-arranging systems and components, I just didn't have time.


At least I was able to confirm that my Optorite DOES burn at 4x - some some idiotic reason, the system I had it in didn't want to read form the hard drives fast enough to burn any DVD-R/+R faster than 2x.  blink.gif

Logged

Taiger

  • Archived User
  • Newbie
  • *
  • Posts: 17
Share Scripts For Others
« Reply #78 on: October 23, 2003, 09:11:00 AM »

Hi vexx22,

Fantastic this thing about scripts, I made my first skript now, hope you don't
mind, but I stole some of yours to make my first.

It's the FanSpeed script I modifyed ...

FanSpeed.xas
QUOTE

<Action>
BeginDraw UseCurrent
  MessageBox "FanSpeed by Taiger, inspired by vexx22 $eol$ $eol$Press A to add 20 Percent to FanSpeed $eol$Press X for default $eol$Press B to Quit"
EndDraw

  Input
    If %_GP_A% == "1" GOTO APRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    If %_GP_X% == "1" GOTO XPRESSED
  QUIT

:APRESSED
  SETFANSPEED Manual 20%
  SETFANSPEED Manual 20%
Input
    If %_GP_A% == "1" GOTO ABPRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    If %_GP_X% == "1" GOTO XPRESSED
  QUIT

:ABPRESSED
  SETFANSPEED Manual 30%
  SETFANSPEED Manual 30%
Input
    If %_GP_A% == "1" GOTO ACPRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    If %_GP_X% == "1" GOTO XPRESSED
  QUIT

:ACPRESSED
  SETFANSPEED Manual 40%
  SETFANSPEED Manual 40%
Input
    If %_GP_A% == "1" GOTO ADPRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    If %_GP_X% == "1" GOTO XPRESSED
  QUIT

:ADPRESSED
  SETFANSPEED Manual 50%
  SETFANSPEED Manual 50%
Input
    If %_GP_A% == "1" GOTO XPRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    If %_GP_X% == "1" GOTO XPRESSED
  QUIT

:XPRESSED
  SETFANSPEED default
  SETFANSPEED default
Input
    If %_GP_A% == "1" GOTO APRESSED
    If %_GP_B% == "1" GOTO BPRESSED
    If %_GP_X% == "1" GOTO XPRESSED
  QUIT

:BPRESSED
  QUIT

</Action>


The thing that I noticed is that it seems like 50% is the same as 100% and the
scale is then between 10 to 50 with 10 as default speed, can this be true or
is there something wrong with my xbox ...
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Share Scripts For Others
« Reply #79 on: October 23, 2003, 10:06:00 AM »

Actually, the range is 10-50. There is no translation to percentage.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Share Scripts For Others
« Reply #80 on: October 23, 2003, 10:32:00 AM »

It looks like when it exceeds 50, you end up setting it back to 10? There is no way to reduce the speed, nor are you reporting the current speed, either the set speed or the actual speed (which you can get via a gadgetstring, $FanSpeed$ should work, I believe).

Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #81 on: October 23, 2003, 11:37:00 AM »

QUOTE (Taiger @ Oct 23 2003, 08:07 PM)
QUOTE (BenJeremy @ Oct 23 2003, 07:32 PM)
It looks like when it exceeds 50, you end up setting it back to 10? There is no way to reduce the speed, nor are you reporting the current speed, either the set speed or the actual speed (which you can get via a gadgetstring, $FanSpeed$ should work, I believe).

gadgetstring ??, do you have any examples on that one smile.gif

$FanSpeed$  was the example

you can use it anywhere you would use a variable or in a text block.

BeginDraw UseCurrent
 MessageBox "FanSpeed is currently : $FanSpeed$ "
EndDraw


or

If $FanSpeed$ =="20" GOTO PERCENT20
If $FanSpeed$ =="30" GOTO PERCENT30
If $FanSpeed$ =="40" GOTO PERCENT40
If $FanSpeed$ =="50" GOTO PERCENT50
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Share Scripts For Others
« Reply #82 on: October 23, 2003, 11:47:00 AM »

Thanks, koldfuzion!

I also just added a new ActionScript clinic on strings in general. Hopefully it will clear things up for new scripters.
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #83 on: October 23, 2003, 12:00:00 PM »

im at work.. so i cant test.. but see if something like this would work.

EDIT: Removed old code.

This post has been edited by koldfuzion: Nov 10 2003, 05:00 AM
Logged

Taiger

  • Archived User
  • Newbie
  • *
  • Posts: 17
Share Scripts For Others
« Reply #84 on: October 23, 2003, 01:11:00 PM »

There is something funny with the :
:START
If $FanSpeed$ =="10" GOTO PERCENT10
If $FanSpeed$ =="20" GOTO PERCENT20
If $FanSpeed$ =="30" GOTO PERCENT30
If $FanSpeed$ =="40" GOTO PERCENT40
If $FanSpeed$ =="50" GOTO PERCENT50

Thing I don't realy know wath it is now, but I will continue to lock tomorrow,
have to go to bed now so that I have a posibility to get up to work tomorrow ....

But Tanx for the nice sugestions :)
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #85 on: October 23, 2003, 03:25:00 PM »

yea, i did a little troubleshooting and found all the problems.  Once i did that.. I realized you cant look for a set value of "10, 20, 30" etc.. caue the fan speed may actually be 18 (compounding the value checking).

so instead i came up with this.. which works flawlessly and provides protection against going too low... if that is in fact possible?


so here is my second KF-Fan. smile.gif   *(heheh i didnt know i had one fan!   Go Team!)

QUOTE

;#################################3
;#  Fan Speed Adjuster
;#  Author: KoldFuzion - Original concept by vexx22, aditional motivation by Taiger
;#  Filename: FanSpeed.xas
;#  Date: 10-23-2003
;#  Purpose:  allows user to set fan speed manually between 10-50%
;##################################

SET NEWFANSPEED $FanSpeed$

GOTO START

:START
BeginDraw UseCurrent
MessageBox "FanSpeed is currently : $FanSpeed$$eol$$eol$A to Increase speed 1$eol$X to Increase speed 5$eol$B to Decrease speed 1$eol$Y to Decrease speed 5$eol$BLACK TO QUIT"
EndDraw
Input
   If %_GP_A% == "1" GOTO INCREASEONE
   If %_GP_X% == "1" GOTO INCREASEFIVE
   If %_GP_B% == "1" GOTO DECREASEONE
   If %_GP_Y% == "1" GOTO DECREASEFIVE
   If %_GP_BLACK% == "1" GOTO QUIT
GOTO START


:INCREASEONE
ADD NEWFANSPEED 1
GOTO DOFAN

:INCREASEFIVE
ADD NEWFANSPEED 5
GOTO DOFAN


:DECREASEONE
SUB NEWFANSPEED 1
GOTO DOFAN

:DECREASEFIVE
SUB NEWFANSPEED 5
GOTO DOFAN

:DOFAN
IF# %NEWFANSPEED% <= 9 GOTO TOOLOW
IF# %NEWFANSPEED% >= 51 GOTO TOOHIGH
SETFANSPEED Manual %NEWFANSPEED%
GOTO START

:TOOLOW
SETFANSPEED Manual 10
SET NEWFANSPEED 10
BeginDraw UseCurrent
MessageBox "WARNING!!$eol$Setting FanSpeed BELOW 10 is not permitted$eol$Doing so may damage your xbox.$eol$$eol$Press A to Continue"
EndDraw
Input
   If %_GP_A% == "1" GOTO START
   If %_GP_BLACK% == "1" GOTO QUIT
GOTO TOOLOW

:TOOHIGH
SETFANSPEED Manual 50
SET NEWFANSPEED 50
BeginDraw UseCurrent
MessageBox "Unable to set FanSpeed ABOVE 50.$eol$$eol$Press A to Continue"
EndDraw
Input
   If %_GP_A% == "1" GOTO START
   If %_GP_BLACK% == "1" GOTO QUIT
GOTO TOOHIGH


:QUIT
QUIT




Please keep in mind the fanspeed value my change slightly while waiting for your input... so you may see unexpected jumps if you press the button too fast, or no jump at all if only increasing/decreasing by 1
Logged

Taiger

  • Archived User
  • Newbie
  • *
  • Posts: 17
Share Scripts For Others
« Reply #86 on: October 23, 2003, 09:59:00 PM »

God Morning, from Finland

I se you have fixed the FanSpeed progi, Nice thats what a program
should look like good work.

It was something like that I wanted to create, but I think I would have needed
like a week to complete the same skript by myself :)

Tanx alot, now I have some more example code to start from whit my next progi :)
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #87 on: October 31, 2003, 10:23:00 AM »

here is a date check/repair script for people that unplug thier xbox often.

See link below for script

This post has been edited by koldfuzion: Nov 4 2003, 03:48 AM
Logged

thetruethugg

  • Archived User
  • Sr. Member
  • *
  • Posts: 432
Share Scripts For Others
« Reply #88 on: November 03, 2003, 12:44:00 PM »

Hey KF, I get an error when hitting anything other than A or Black when using your datefix script, so I can't actually change the date.  The error I get is:

ERROR (line 1): (callfile) "ActionScript file failed execution"

I have the script saved as an .xas file, which I call from the menu, rather than from mxm.xml, if that makes a difference.

This post has been edited by thetruethugg: Nov 3 2003, 08:52 PM
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #89 on: November 03, 2003, 01:20:00 PM »

Datefix Script

i just tested it out on the n6 release and its working fine on my box.  I downloaded that version to my pc and put it up on AXS.  try that one and see if it produces the same error.

you are running n6 right?

calling from a file is fine.   I have all mine set up that way.

This post has been edited by koldfuzion: Nov 3 2003, 09:21 PM
Logged
Pages: 1 ... 4 5 [6] 7 8 9