Help - Search - Members - Calendar
Full Version: Texteditor
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official MediaXMenu (MXM) Forum > MXM ActionScripting Forum
Kthulu
ok, non-WIP versions of fileOpen.xas, virtualKB.xas, and TextEditor.xas have been posted to the following thread:
Pinned::Actionscripts Collection

of course, if you are a WIP tester, and want to use the scripts, you'll have to modify them. you only have to modify the Input code. it should be fairly easy to modify to use StringInput instead of my keyboard.

if you have problems with the scripts or want to ask questions, please return here.
thanks.
yourwishismine
that sounds like an impressive piece of work...

now if I only had access to the wip releases I could test it out..

oh well... I'll check it on the next public release... please upload it to allxboxskins

and my ftp server listed in my signature so I can share it around the #mxmfiles channel...

TIA
Kthulu
DELETE
geniusalz
Very cool smile.gif

Problem:
-Deleting last blank line and saving actually deletes last line of text.

Thoughts:
-In the keyboard, use Left Trigger + left/right to move cursor
-Assign one of the freed buttons to delete
-Help (START) doesn't work
-Move kb a bit higher

-If possible, integrate keyboard into the main screen, so that 'edit line' is no longer required
-You might be able to use the builtin keyboard fo that. Pressing Right Trigger+Y activates/deactives it (supposed to, but doesn't work right now) However, you can still activate it from the script
ub312g0d
wow. I'm extremely impressed, finally a working text editor, I find it funny though that a dashboard did it before a standalone app. Just goes to show the power of action scripting. I havent tested it out yet as of its 3 am, but looks and sounds incredible. Mad props to you man.
Kthulu
thanks guys!

QUOTE

Problem:
-Deleting last blank line and saving actually deletes last line of text.

thanks for letting me know that. i thought i had squashed that bug...
QUOTE

Thoughts:
1. In the keyboard, use Left Trigger + left/right to move cursor
2. Assign one of the freed buttons to delete
3. Help (START) doesn't work
4. Move kb a bit higher

1 & 2
i've been thinking how i can re-work the button-interface to add more features and still keep the same features in a non-WIP version. i had some pretty good ideas on how to add cut, copy, and paste. i think my button rearrangement ended assigning delete to B as well. my notes are scribbled on a piece of paper at home and i can't remember them. i'm visiting a friend this weekend, so won't have time to work on anything. i'll keep your thoughts in mind when i get back home.
3. yeah, i haven't figured out how/ or if its even possible to detect the Start button in the WIP stuff (my keyboard was written in non-WIP and hastily ported over)
4. i remember KF suggesting that when i first made the keyboard. i thought i did, but i'll see about raising it about 10 more pixels...
DBZRacer
Amazing work Kthulu. beerchug.gif
Kthulu
DELETE
yourwishismine
Links is dead as of 6:00 am AEST.
Kthulu
DELETE
thetruethugg
Looks like an impressive update. I can mirror the pictures and zip if you'd like.
EcL|PsE
fucking awesome work man!
Kthulu
thanks, really, but BJ is really the one that did the awesome work of creating MXM and giving us the ability use actionscripts. if my scripts are good, it is only because i stand on the shoulders of giants smile.gif

smile.gif Hear my prayer, Oh Great One, and continue to bless us with your most awesome dash smile.gif
MXM
geniusalz
Suggestion:
Instead of displaying the line being edited at the bottom, show it in the proper place.
Kthulu
i guess 'proper place' is a matter of opinion, but i'll think about it
geniusalz
I meant proper place as in the line itself in the display up there, instead of having a separate textbox down there.
Kthulu
QUOTE
I meant proper place as in the line itself in the display up there, instead of having a separate textbox down there.

i know, that's why i said i'd think about it smile.gif
Kthulu
DELETE
Kthulu
update:
- added $ % " and \ to last keypad in keyboard
- fixed bug with passing filename arg when calling script
- new character are inserted into the edit line instead of over-writing
- i may have temporarily killed the ability to delete chars from edit line. if i did, it's fixed now.

next:
- add some sort of copy/paste functionality
- add a help menu item

then:
- write fileOpenDialog script to be used for selecting files to open and where to save. this should be pretty quick easy, so if i get frustrated with copy/paste above, may go ahead and do this.
Kthulu
update:
- added copy function to menu
- added paste function to menu
- added help function to menu

NOTE: copy/paste works like this:
1. select a line you want to copy from
2. delete unwanted text from the 'edit-line' on keyboard
3. bring up menu and select 'copy'
4. select line to paste to
5. move cursor to desired paste position
6. select 'paste' from menu

I have now added all the features that I personally want from a texteditor running on the xbox (atm at least). Therefore, no more feature additions are planned except for the file-open dialog. It's time to actually do that now smile.gif
feflicker
Damn. That is out of hand... Nice work biggrin.gif
Yuyu
Dman Kthulu.... That's off the chain...
HEHE, I mean awsome work...
yourwishismine
QUOTE (Kthulu @ Feb 5 2004, 11:12 PM)
tired of scrolling? here ya go...TextEditor.zip

update:
- added copy function to menu
- added paste function to menu
- added help function to menu

NOTE: copy/paste works like this:
1.  select a line you want to copy from
2.  delete unwanted text from the 'edit-line' on keyboard
3.  bring up menu and select 'copy'
4.  select line to paste to
5.  move cursor to desired paste position
6.  select 'paste' from menu

I have now added all the features that I personally want from a texteditor running on the xbox (atm at least).  Therefore, no more feature additions are planned except for the file-open dialog.  It's time to actually do that now smile.gif

::RESPECT::

That's some excellent work you've done there...



EDIT: For anyone interested, 536 Lines of script work there... that's a lot of time and work... nice work Kthulu
Infared
nice AS... except "I" have a prob ...

i got da texteditor file and put it in my xbox... it gives a stupid error saying something about "error 1, callfile failed" bla bla bla...
i tried other files like reboot.xbe and da same error came...

appreciate if some1 can help me

keep up da good work! biggrin.gif
thetruethugg
CODE
  <Item>
  <Title>Tetris</Title>
  <Description>Action script for Tetris</Description>
   <Action>
   CallFile E:\Actions\tetris.xas
   </Action>
   <media>::ICO_ACTION</media>
   <Thumbnail>::ICO_ACTION</Thumbnail>
  </Item>


That's what I use to call an action script. Try that, should work. Only with the appropriate file.
flattspott
It'd help to know how you're using it in your menu.xml
ub312g0d
Infared, Unless you have the WIP version it wont work yet until the next public release, Try to modify thetruethugg's code to your liking in your menu.xml. of course its not for tetris, so change all that stuff to the texteditor file.
Infared
sad.gif
Kthulu
QUOTE
i tried other files like reboot.xbe and da same error came...

not sure what you were doing with the reboot.xbe there, so just to make sure you know...this is a text editor, not an xbe title editor.

1. make sure you have the latest version (obtained by the links in this thread)
2. follow the above examples for adding to your menu.xml
3. make sure you are trying to open a legitimate file.

QUOTE
EDIT: For anyone interested, 536 Lines of script work there... that's a lot of time and work... nice work Kthulu

wow, i didn't realize there were that many lines...maybe i should go back and re-organize the code to remove any redundancy...lol

really though, thanks for the props. just about anything i'll ever write, will be written for myself, but if others get use out of it...that's the icing on the cake. i am very curious though if anyone is actually using this and what sort of things they use it for...
geniusalz
QUOTE (Kthulu @ Feb 8 2004, 01:55 AM)
just about anything i'll ever write, will be written for myself

Selfish! grr.gif

j/k

It's not practical without the file browser, as you need a text editor to tell it what file to open. Unless you have another copy of this script to edit the path in this script.

But you already said you're onto that, so it's all good wink.gif

I guess the browser is yet another thing you're going to do right before it' implemented internally into MXM. ohmy.gif
Talk about coincidence laugh.gif
Kthulu
crap! my bad, i left that path in from debugging...

supposed to be SET myPath %1%

changed it just now...maybe that's why guy was having problems, but still...you could always select Open from the menu and use the MXM built-in keyboard to specify a file path. if you call the script without a file path, that is what is supposed to happen (now that i fixed it smile.gif )

EDIT: also, just fixed it so that if you call the script with no filepath arg and enter blank text from built-in keyboard, it will just exit instead of give error messages.

is there gonna be a file-browser? if so, i'm not going to put much effort into scripting one...just enough to get me to the release.
BenJeremy
Well, you may want to hang loose, at least until the dialog stuff starts going intot he WIP, because I'll need your help in creating internal scripts as part of the config and file manager stuff.

I really appreciate the great scripts, even though I can't check them out myself right now sad.gif

It just affirms my decision to concentrate on the ActionScripting when I see cool scripts like these.
flattspott
QUOTE
It just affirms my decision to concentrate on the ActionScripting when I see cool scripts like these.


Thanks man!
Kthulu
QUOTE
It just affirms my decision to concentrate on the ActionScripting when I see cool scripts like these.

yes, thank you!

btw, i noticed something unexpected to me concerning READFILELN and FILESTAT...

some.txt file...
QUOTE

This is fileln one.
This is fileln two.
This is fileln three.<eof>


when read to <eof> (using FILESTAT) it reads 3 lines. this was expected.

some.txt file...
QUOTE

This is fileln one.
This is fileln two.
This is fileln three.
<eof>


this resulted in 3 lines being read also, but i expected 4. is it supposed to be just 3?

great way to wrap-up a thank you, eh? smile.gif
BenJeremy
Probably because the end is whitespace (CR/LF sequence)... technically, since there is no characters following the CR/LF, there is no line to read, hence only 3 lines of text.
Kthulu
i whipped up a FileOpen dialog today. not pretty but functional enough i think. embarrasingly, i just spent about 4 hours trying to merge it into texteditor.xas so there would be no room for error for setting up the correct callfile path. i gave up!

but it's there. to use it, you will need to comment the StringInput line and uncomment the CallFile c:\mxm\scripts\fileopen.xas line. Again, make sure you change the path to whatever is appropriate.

i tested the texteditor out opening some big xbe's and to my surprise, it didn't bomb. it did take a long time to load them though. i was just looking for a filesize limit there and wondering what would happen if somebody accidentally loaded an xbe into it.

i have added file-extension checking anyway though. txt, xml, ini, nfo, and xas are the ones i added i think. if you want more, it should be pretty easy to edit.

i will be out of town and away from free-time internet for most of the coming week, so hopefully there won't be anything too terribly wrong with the files above.
Motocrossman
i need help i have no idea how to run this
don't flame me cuz i am a noob
thetruethugg
Hmm, cool. I'll test this out tonight.
Kthulu
QUOTE (Motocrossman @ Feb 11 2004, 07:06 PM)
i need help i have no idea how to run this
don't flame me cuz i am a noob

you must have a WIP release of MXM for this to run. however, if there's demand for it or if get bored, i'll convert to a non-WIP version.
thetruethugg
Well, it works pretty good. Didn't get to test much, and I feel like an idiot for asking this, but how do you change the line you want to edit? I hit everything, couldn't figure out how to NOT edit only the first line of the file. Maybe it says in this post, too lazy to check, and I need to head to bed now anyway.

Very impressive though, congrats man, really.
Motocrossman
QUOTE
you must have a WIP release of MXM for this to run. however, if there's demand for it or if get bored, i'll convert to a non-WIP version.


if it is possible can u convert it to non-WIP version.
are the WIP version avalible in the usual places?
thanks
thetruethugg
No, the WIP builds or for the WIP testers only, they may be unstable and cause something wrong to happen to your xbox (this is unlikely, but it did happen awhile ago, one of the builds caused a corrupt eeprom I believe, when switching the video that is, from NTSC to PAL and vise-versa). But, BJ is expecting to have MXM 0.9o (or 0.9n.7) out soon.
Infared
a non-WIP version would be cool
Kthulu
QUOTE (thetruethugg @ Feb 12 2004, 03:16 AM)
Well, it works pretty good. Didn't get to test much, and I feel like an idiot for asking this, but how do you change the line you want to edit? I hit everything, couldn't figure out how to NOT edit only the first line of the file. Maybe it says in this post, too lazy to check, and I need to head to bed now anyway.

Very impressive though, congrats man, really.

if you got the script from the links in this thread, there should have been a 'Help' item in the menu. you bring up the menu by pressing the White button smile.gif

but here's a brief run-down of the controls...

White - brings up menu
Black - deletes characters in the edit line
A - types the currently selected character from the keyboard
B - cycles thru the different keypads
X - moves the cursor (^) back
Y - moves the cursor (^) forward
Dpad - select a key from the keyboard or menu navigation
Rt-Trig + Dpad - scrolls text up, down, left or right

QUOTE
if it is possible can u convert it to non-WIP version.
are the WIP version avalible in the usual places?
thanks

i will definitely do that, but i prolly won't have time till after this weekend. i will convert the fileOpen script as well. for an idea of how you might use the fileOpen script with your scripts, see The Executioner thread...
Kthulu
see first post...
Motocrossman
have u made a non-wip version?
flattspott
Did you even look at the first post?
Motocrossman
so what do i do with the info on that page.
PS don't flame me cuz i am new to MXM ActionScripting
thanks
flattspott
You ask if there was a non WIP version. In the first post, the first line is:
ok, non-WIP versions of fileOpen.xas, virtualKB.xas, and TextEditor.xas have been posted to the following thread:
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.