xboxscene.org forums

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

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

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #105 on: November 10, 2003, 10:54:00 AM »

smile.gif


Edit: I did added a delay 2 after the minimum/maximum messages so they appear.
Logged

fastTOE

  • Archived User
  • Full Member
  • *
  • Posts: 242
Share Scripts For Others
« Reply #106 on: November 10, 2003, 11:08:00 AM »

QUOTE
awesome, glad you are finally seeing results. Did you use the callfile method in your menu to get it working?

yea, that way its much easier to edit and such,... thanks for the idea...

on another note
QUOTE
I believe the default speed is 20.

i am just guessing here, but isnt the default speed actually 10 aka 20%? since 10/50 is 20% .... because whenever i start my box and use kf's fanspeed adj it is always at 10 already, ALSO in the mxmskinner default is 20%,... so these two things seem to point to the default either being 10 or 20% which is in fact the same thing.... juss inferring here...
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #107 on: November 10, 2003, 11:16:00 AM »

well the script just grabs what the current fanspeed it when the script is activated.. so yes, the default would be 10/20%.  

Since you actually have to mod your bios to keep that setting, it will always reset to 10 every time you reboot your machine.

Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Share Scripts For Others
« Reply #108 on: November 10, 2003, 01:38:00 PM »

QUOTE
Since you actually have to mod your bios to keep that setting, it will always reset to 10 every time you reboot your machine.

can you point me in the right direction to how to go about doing that?  i really love the power that actionscripting gives us, but i'd much rather mod my bios and be done with the whole fan affair...
Logged

koldfuzion

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

X-S should have a link to XBtool
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Share Scripts For Others
« Reply #110 on: November 12, 2003, 10:50:00 AM »

smile.gif  I have made a few additions to the file without being able to test (comments, messagebox prompt, etc.), but it worked perfect last i tested.  Let me know if there are any problems.  Enjoy!!!
CODE

;NAME: virtualKB
;PURPOSE: To provide an efficient method of getting user-input strings
;RETURNS: _kbInput - contains text entered by user
;USAGE:
;Callfile c:mxmscriptsvirtualKB.xas "Please enter some text:"
;BeginDraw UseCurrent
;  MessageBox "You entered: %_kbInput%"
;EndDraw
;
;When the keyboard is displayed:
;X-button - moves cursor back
;Y-button - moves cursor forward
;A-button - adds selected character to string
;B-button - changes case
;CLEAR   - sets string to ""
;BACK   - see X-button
;FORWARD   - see Y-button
;ENTER   - sets _kbInput = input string and quits
;---------------------------------------------------------------------

SET X 125
SET Y 365
SET W 25
SET H 25
SET capLock 1
SET keyboardInput ""
SET leftString ""
SET rightString ""
SET aChar ""
SET cursor 0

SET row1a "1  2  3  A  B  C  D  E  F  G  CLEAR"
SET row2a "4  5  6  H   I   J  K  L  M  N  BACK"
SET row3a "7  8  9  O  P  Q  R  S  T  U  FORWARD"
SET row4a "0  -    .  V  W X  Y  Z  _       ENTER"

SET row1b "1  2  3   a  b  c   d  e  f   g  CLEAR"
SET row2b "4  5  6   h   i   j    k  l  m  n  BACK"
SET row3b "7  8  9   o  p  q    r  s  t   u  FORWARD"
SET row4b "0  -    .   v  w  x   y  z  _      ENTER"

SET lowerCase "123abcdefg456hijklmn789opqrstu0-.vwxyz_ "
SET upperCase "123ABCDEFG456HIJKLMN789OPQRSTU0-.VWXYZ_ "

:PAINT
BeginDraw UseCurrent
 If %1% == "" GOTO SKIPMSGBOX
 MessageBox %1%

:SKIPMSGBOX
 BOX 10 330 670 200
 BOX 10 330 670 25
 BOX %X% %Y% %W% %H%

 If# %capLock% == 1 GOTO DRAWKEYBOARDCAP
 TEXT 30 330 0 "%leftstring%>%rightString%" YELLOW
 TEXT 130 365 0 "%row1b%" WHITE
 TEXT 130 390 0 "%row2b%" WHITE
 TEXT 130 415 0 "%row3b%" WHITE
 TEXT 130 440 0 "%row4b%" WHITE
 GOTO DRAWKBEND

:DRAWKEYBOARDCAP
 TEXT 30 330 0 "%leftstring%>%rightString%" YELLOW
 TEXT 130 365 0 "%row1a%" WHITE
 TEXT 130 390 0 "%row2a%" WHITE
 TEXT 130 415 0 "%row3a%" WHITE
 TEXT 130 440 0 "%row4a%" WHITE

:DRAWKBEND
EndDraw

INPUT
If %_GP_D_LF% == "1" GOTO LF
If %_GP_D_UP% == "1" GOTO UP
If %_GP_D_DN% == "1" GOTO DN
If %_GP_D_RT% == "1" GOTO RT
If %_GP_X% == "1" GOTO BACK
If %_GP_Y% == "1" GOTO FORWARD
If %_GP_A% == "1" GOTO GETKEY
If %_GP_B% == "1" GOTO SETCAP
If %_GP_BACK% == "1" GOTO END
If %_GP_START% == "1" GOTO RETURN
GOTO PAINT

:END
QUIT
------------------------------
:SETCAP
If# %capLock% == 1 GOTO CAPOFF
SET capLock 1
GOTO PAINT
------------------------------
:CAPOFF
SET capLock 0
GOTO PAINT
------------------------------
:UP
If# %Y% == 365 GOTO PAINT
SUB Y 25
GOTO PAINT
------------------------------
:DN
If# %Y% == 440 GOTO PAINT
ADD Y 25
GOTO PAINT
------------------------------
:LF
SET W 25
If# %X% == 125 GOTO PAINT
SUB X 25
GOTO PAINT
------------------------------
:RT
SET W 125
If# %X% == 375 GOTO PAINT
SET W 25
ADD X 25
GOTO PAINT
------------------------------
:GETKEY
SETFUNC   strLen LENGTH %keyboardInput%
SET charX %X%
SET charY %Y%
SUB charX 125
DIV charX 25
SUB charY 365
DIV charY 25
If# %charX% == 10 GOTO GETSPECKEY
If# %strLen% > 46 GOTO PAINT
MULT charY 10
ADD charX %charY%
SETFUNC aChar MID %charX% 1 %upperCase%
If# %capLock% == 1 GOTO SETKBINPUT
SETFUNC aChar MID %charX% 1 %lowerCase%

:SETKBINPUT
If# %cursor% == 0 GOTO GETRIGHTSTRING
SETFUNC leftString LEFT %cursor% %keyboardInput%

:GETRIGHTSTRING
SET nextCursor %cursor%
ADD nextCursor 1
SETFUNC strLen LENGTH %keyboardInput%
If# %strLen% == %cursor% GOTO GETCHAR
SUB strLen %nextCursor%
SETFUNC rightString MID %nextCursor% %strLen% %keyboardInput%

:GETCHAR
SET leftString %leftString%%aChar%
SET keyboardInput %leftString%%rightString%
ADD cursor 1
GOTO PAINT
------------------------------
:GETSPECKEY
If# %charY% == 0 GOTO CLEAR
If# %charY% == 1 GOTO BACK
If# %charY% == 2 GOTO FORWARD
If# %charY% == 3 GOTO RETURN
GOTO PAINT
-----------------------------
:BACK
If# %cursor% == 0 GOTO PAINT
SUB cursor 1
SET rightString %aChar%%rightString%
SETFUNC aChar RIGHT 2 %leftString%
SETFUNC aChar LEFT 1 %aChar%
SETFUNC leftString LEFT %cursor% %leftString%
GOTO PAINT
-----------------------------
:FORWARD
SETFUNC   strLen LENGTH %keyboardInput%
If# %cursor% == %strLen% GOTO PAINT
ADD cursor 1
SETFUNC aChar LEFT 1 %rightString%
SET leftString %leftString%%aChar%
SETFUNC strLen LENGTH %keyboardInput%
SUB strLen %cursor%
SETFUNC rightString RIGHT %strLen% %keyboardInput%
GOTO PAINT
-----------------------------
:CLEAR
SET _kbInput ""
SET keyboardInput ""
SET keyboardInput ""
SET leftString ""
SET rightString ""
SET aChar ""
SET cursor 0
GOTO PAINT
QUIT
-----------------------------
:RETURN
SETFUNC _kbInput TRIM %keyboardInput%
SET keyboardInput ""
SET leftString ""
SET rightString ""
SET aChar ""
SET cursor 0
GOTO END
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #111 on: November 12, 2003, 11:22:00 AM »

i will check this out first thing when i get home... looks awesome though..great idea..and great implementation.  Looks like this will become the default for user input. Cant wait to try it.
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #112 on: November 12, 2003, 12:29:00 PM »

yea sure.  I am hoping it works great so i can use it for the newuser script.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Share Scripts For Others
« Reply #113 on: November 12, 2003, 12:38:00 PM »

i hope it works great and everyone enjoys it.  it probably still needs some tweaking tho.  displaying the 'keyboard' part on the screen is a little hap-hazard because the default system font is not a fixed-width font.  i know it would be difficult to incorporate a feature into MXM Actionscripting that would allow one to change the font used for messageboxes and such, so i have this idea...

EDIT:  I just realized that the board may have altered the spacing in my 'keyboard display', so everything might not line up on your screens if you copy/paste from here.  i'm looking for a place to upload...

when MXM uses a system-default font, is it getting from some font file on the hard-drive?  if so, maybe some scripting could be written that temporarily swaps this font file out with one that contains a fixed-width font...
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Share Scripts For Others
« Reply #114 on: November 12, 2003, 06:15:00 PM »

cool.gif
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Share Scripts For Others
« Reply #115 on: November 12, 2003, 07:17:00 PM »

QUOTE (Kthulu @ Nov 12 2003, 04:38 PM)
i hope it works great and everyone enjoys it.  it probably still needs some tweaking tho.  displaying the 'keyboard' part on the screen is a little hap-hazard because the default system font is not a fixed-width font.  i know it would be difficult to incorporate a feature into MXM Actionscripting that would allow one to change the font used for messageboxes and such, so i have this idea...

EDIT:  I just realized that the board may have altered the spacing in my 'keyboard display', so everything might not line up on your screens if you copy/paste from here.  i'm looking for a place to upload...

when MXM uses a system-default font, is it getting from some font file on the hard-drive?  if so, maybe some scripting could be written that temporarily swaps this font file out with one that contains a fixed-width font...

There will be some resource management for ActionScripts in the future.... but it does complicate things a bit.

I was just considering sounds and images, but fonts will work as well - but will require me to re-work some things. wink.gif

My original idea was that using a standard font would be a good thing, if a bit restricting, due to consistency.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Share Scripts For Others
« Reply #116 on: November 12, 2003, 08:11:00 PM »

smile.gif
Logged

koldfuzion

  • Archived User
  • Hero Member
  • *
  • Posts: 1226
Share Scripts For Others
« Reply #117 on: November 13, 2003, 05:59:00 AM »

QUOTE (DBZRacer @ Nov 13 2003, 10:32 AM)
Sweet job on the keyboard Kthulu... Looks like awesome work.

KF, I still havent had a chance to work on the newuser script/alphabet soup. Might be good anyways since now theres a virtual keyboard here now that will make it very simple for someone to start up MXM now and config just about all the mxm.xml settings they want without ever opening up an xml doc.

I agree. We should hold off until the VK script is done and implement that.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Share Scripts For Others
« Reply #118 on: November 15, 2003, 12:39:00 PM »

smile.gif
Logged

koldfuzion

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

awesome script... BJ, any thoughts on including this as an internal script?

here is an updated pic.  The lines1 thru 12 are possible messagebox lines for use by the scripter.  and if you hit B, you get 4 different keyboards,  Upper case, lower case, sybmols  and numbers and more symbols.

user posted image
Logged
Pages: 1 ... 6 7 [8] 9