Early ETScript 4 preview!


(Flippy) #21

Ok, there is now an option to make the editor use spaces instead of tabs, for example when it is auto-indenting, or in the Format Document/Selection feature.

There are also two new related features:

  • Tabify Selection (converts spaces in selection to tabs (4 spaces = 1 tab))
  • Untabify Selection (converts tabs in selection to spaces (1 tab = 4 spaces))

And I finally got Outlining to work properly, so that is also a new feature!
You can hide/show classes and events by clicking on an expand / collapse button next to the class / event name.
I made a video of this, and it’s uploading now. Hold on!

Video:

Code Outlining


(Flippy) #22

Latest new feature: View Backup Changes

While editing a script, you can revert back to an older backup by using File - Revert to Backup. A list of available backups will be presented to you, and you can choose one from that list.

To help you find the correct backup, you can now use the View Changes button to get a side-by-side view of both files (the current document and the selected backup).

Differences between the files are highlighted: Deleted lines are highlighted in red, modified lines in gray and new lines in orange.

Screenshot:


(shagileo) #23

stop teasing and start releasing :stroggbanana:

hehe - nah, take your time, it’s all looking so good so far. I hope the screenshots live up to the program :wink:


(Diego) #24

One question about this feature. If I spend the time to collapse all the scriptblocks will ETscript remember the collapsed state the next time I open the file so that I do not have to collape everything again?

Or is there a majick button that will collapse all script blocks and uncollapse them?


(Flippy) #25

[QUOTE=Diego;190239]One question about this feature. If I spend the time to collapse all the scriptblocks will ETscript remember the collapsed state the next time I open the file so that I do not have to collape everything again?

Or is there a majick button that will collapse all script blocks and uncollapse them?[/QUOTE]

Good question. I am working on this and similar stuff at the moment. I also want things like the Bookmarks to be remembered. However, I cannot store the information in the script file itself, as that would break it in the game. I am looking for a good method to store the information, but I’m sure I will find one :wink:

And yes, there is a button to collapse or expand all Classes and Events.


(kamikazee) #26

[QUOTE=Flippy;190245]Good question. I am working on this and similar stuff at the moment. I also want things like the Bookmarks to be remembered. However, I cannot store the information in the script file itself, as that would break it in the game. I am looking for a good method to store the information, but I’m sure I will find one ;)[/QUOTE]Tools like Visual studio store “region” info in comments.

Beware that users may remove comments though, so this may FUBAR all regions further on.


(Flippy) #27

[QUOTE=kamikazee;190335]Tools like Visual studio store “region” info in comments.

Beware that users may remove comments though, so this may FUBAR all regions further on.[/QUOTE]

Nope, at least not for Visual Basic files. The .vb files, which carry the source code for every window etc, can be opened in notepad and contain nothing more than the text you see in the editor. I think Visual Studio stores this information in the project files. I don’t want to make project files for ETScript though, I like it much better if you can just edit the actual script files instead of having to open and save project files…


(Flippy) #28

I think I may release a beta version very soon.

I found out that the editor I’m using already provides a method to store the bookmark information, but I cannot store the state of the Outlining nodes*. However, there is a bug in the source code that causes an error when you try to load a file. The error is not critical, it doesn’t end the program or anything, but I don’t want an error popping up every single time…
I am waiting to see if I can get my hands on a bug fix so that I can stop this error from happening. But if I can’t find that, I have no choice but to leave out that option altogether. That means that bookmarks will not be stored either, which would suck pretty bad…
However, Im hoping to get the bug fix soon…

There are still some issues, for example there are two errors when you first start the application and I have no idea where they come from. But because they don’t stop you from using the program, I will leave them in for now for the beta.
I am pretty sure you guys will find loads more little bugs in the beta so I can fix them too in the first final version.

*The editor usually creates the Outlining nodes automatically, based on the programming language it is editing, but since W:ET script is not a very big programming language I had to create my own parser, which does not support the automatic outlining. The editor can only store the automatic outlining ranges, but not the manual ones.


(S14Y3R) #29

I for one wouldn’t mind having to re-collapse the script blocks, I think having saved bookmarks is more important. That was a huge pain with Crimson. I needed to have my scriptblock names commented out at the beginning of the script, then hit find next to get to the block, set bookmark, go back, set the next one, etc… and if I needed to open crimson while ingame, it was a pain to get to the block I wanted fast.

If the little error isn’t critical, maybe there’s someway to hide, or auto close it? As you say, there will always be new bugs to find upon beta release. Maybe an idea will come to you from someone on how to deal with it.

Best of Luck.


(Diego) #30

A Beta Release sounds good to me. Storing the Outline collapsed information is not as important as having the ability to collapse or expand the whole thing with a button. So if that’s in there, it’s all good.


(Flippy) #31

Slayer: No, there’s no way to hide the error. I think the developers already have a bug fix however, so it will probably be fixed before a release.

Also note that there is no need to place bookmarks on your scriptblocks (I called them classes), because you can use the Class (and Events) List for that. It’s a dropdown list at the top of your code from which you can select one of the available classes. Selecting one will take you to that class immediately. Also, if you move the position of the cursor in the text, these lists will update to show the current class and event.

Diego: yes, you can simply use the Outlining menu (also available in the right click menu) and use the Collapse All or Expand All buttons to collapse or expand all classes and events. You can also put these buttons on the toolbar directly if you wish; the toolbar is completely customizable. At the moment there are no shortcuts for the buttons. I might add them, but I’m not sure if many people will use it. I’d rather let them set their own shortcut (which you can do!) when they find that they need it often.


(Flippy) #32

The bug has been fixed, I expect a release soon! I will try to hold back on the urge to build more features into it and start getting it ready for a beta release… :tongue:


(Flippy) #33

Ok, very first beta released!
http://www.splashdamage.com/forums/showthread.php?p=190662#post190662


(Crytiqal) #34

I have one question

can this program be used with .php files aswell? :>


(Flippy) #35

[QUOTE=Crytiqal;324183]I have one question

can this program be used with .php files aswell? :>[/QUOTE]

No.

You can probably open them, but that’s about it. It’s made specifically for W:ET script files.


(Crytiqal) #36

Ok no problem :wink:

Looks as if it’s a nice program. Good job


(stealth6) #37

[QUOTE=Crytiqal;324183]I have one question

can this program be used with .php files aswell? :>[/QUOTE]

If you’re looking for a program that’s good for looking at all kinds of code, notepad++ is the way to go :slight_smile:


(Mateos) #38

The Omni-Bot plugins for Notepad++ are very handy (wm_announce extraction and listing in a new file, parameters highlight to avoid typos), feel free to do some for .arena, .objdata, .shader files and others! Personally, bound all that files to Notepad++.

Haven’t found that thread before, I read it!