xboxscene.org forums

Pages: 1 [2] 3

Author Topic: Texteditor  (Read 542 times)

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Texteditor
« Reply #15 on: February 05, 2004, 08:36:00 AM »

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.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Texteditor
« Reply #16 on: February 05, 2004, 07:12:00 PM »

smile.gif
Logged

feflicker

  • Archived User
  • Hero Member
  • *
  • Posts: 1692
Texteditor
« Reply #17 on: February 05, 2004, 08:13:00 PM »

biggrin.gif
Logged

Yuyu

  • Archived User
  • Hero Member
  • *
  • Posts: 908
Texteditor
« Reply #18 on: February 05, 2004, 08:51:00 PM »

Dman Kthulu.... That's off the chain...
HEHE, I mean awsome work...
Logged

Infared

  • Archived User
  • Newbie
  • *
  • Posts: 28
Texteditor
« Reply #19 on: February 06, 2004, 11:10:00 AM »

biggrin.gif
Logged

thetruethugg

  • Archived User
  • Sr. Member
  • *
  • Posts: 432
Texteditor
« Reply #20 on: February 06, 2004, 11:20:00 AM »

CODE
    
    Tetris
    Action script for Tetris
   
   CallFile E:\Actions\tetris.xas
   

   ::ICO_ACTION
   ::ICO_ACTION
    


That's what I use to call an action script.  Try that, should work.  Only with the appropriate file.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Texteditor
« Reply #21 on: February 06, 2004, 11:21:00 AM »

It'd help to know how you're using it in your menu.xml
Logged

ub312g0d

  • Archived User
  • Full Member
  • *
  • Posts: 195
Texteditor
« Reply #22 on: February 06, 2004, 10:09:00 PM »

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.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Texteditor
« Reply #23 on: February 07, 2004, 08:55:00 PM »

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...
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Texteditor
« Reply #24 on: February 07, 2004, 11:01:00 PM »

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
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Texteditor
« Reply #25 on: February 07, 2004, 11:32:00 PM »

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.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Texteditor
« Reply #26 on: February 08, 2004, 04:08:00 AM »

sad.gif

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

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Texteditor
« Reply #27 on: February 08, 2004, 06:59:00 AM »

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


Thanks man!
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Texteditor
« Reply #28 on: February 08, 2004, 08:37:00 AM »

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
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Texteditor
« Reply #29 on: February 08, 2004, 10:47:00 AM »

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.
Logged
Pages: 1 [2] 3