ETScript 2 - Beta 1 download


(Flippy) #21

I have had no luck with my idea to speed up syntax highlighting. It’s not working…

I have one last idea which I had a long time ago, but didn’t think it was that good back then.

I’ll ask you guys here what you think about it.

If I can save the script file as an RTF (RichTextFormat) file, then the coloring will be stored inside the file, and it will load instantly.
However, W:ET cannot read these files, so I will have to save them under a different name, like “.etscript” or something like that.
One of the drawbacks I thought of previously was that you would have to go into ETScript and ‘resave’ the script as a “.script” file each time you wanted to test your map, because the actual “.script” file was not being modified.

But I had another idea, to keep the “.script” file synchronised with the “.etscript” file. Each time you save the “.etscript” file, you will also automatically save the “.script” file.
And when you open a “.script” file, ETScript will look in the maps folder to see if the “.etscript” file exists, and open that instead.

That way, the only time you must wait for it to colorize is the very first time you open the script.

Good idea?


(Flippy) #22

Well, I already coded it in, and I must say it works better than I expected :slight_smile:

As a user, you won’t even notice it.

When you select ‘Open file’, you can still only select “W:ET Script files” (.script), but when you open them, behind the scenes, the program checks if a ".etscript" file is present. If it is, then that file is opened instead of the actual script file.
If it is not present, the script file gets loaded (this is the only time it will ever take loading time), then saved to the “.etscript” file, and then the “etscript” file is loaded.
So again, you are not editing the script file directly.

If you save your script, it appears as though you are only saving the “.script” file, but behind the scenes, you are also saving the “.etscript” file. So the “.script” and “.etscript” files will always be synchronized, UNLESS you open the files with another editor. I might have an idea to overcome that last little issue but tbh I don’t think it’s really necessery.

But yeah, loading times are now approximately 0 seconds :smiley: (Except for the very first load time of any script, when the ‘.etscript’ file is not made yet, then it takes loading time.)


(murka) #23

okay here are the details of my movement:
i open etscript, i load my script which is 4.5k lines, i then select a random line(by clicking anywhere on it, then i go from the bookmarks menu to select save, when i reopen the window i dont see any names instad a slot x(i saw your early pics so this should be line nr or sth).
what might be the problem and am i the only one with it?


(Flippy) #24

You shouldn’t see any names.

The bookmarks bookmark lines. You have 5 slots per map, the bookmarks are saved according to map. If you load map A and save a few bookmarks, those bookmarks will only be available on map A, not on map B.

The 5 submenus in the Load menu are the 5 lines. “Slot [number] - [Line]”.

Has this cleared something up? I don’t really understand what you are expecting to see in the bookmarks menus.


(aaa3) #25

i think the parallel 2 savings are an excellent idea!! i suggest u to use it without question


(Flippy) #26

Updates:

[ul]
[li]Bugs in the bookmarks system fixed. Bookmarks now work even with multiple documents opened. They are still saved by map so the bookmarks will change when you switch from one script to another.
[/li][li]AutoComplete and Intellisense merged. The complete packaged is still called Intellisense, but it now includes both the list showing you the keywords and the label with descriptions and usage.
[/li][li]Added toolbar buttons for the Alignment functions. (Show side-by-side, stacked, squared, cascaded)
[/li][li]Rebuilt the AutoBackup Manager user interface. Replaced the filelist and labels with a Listview similar to how Windows lists files in explorer. Sorting is done similar as in Windows aswell, by clicking the column header.
[/li][li]Fixed some bugs with AutoIndenting
[/li][li]Fixed a bug where the code textbox would not refresh properly, leaving ‘ghost images’ of old text behind.
[/li][li]Added some more features:
[/li][list]
[li]BIndent selection:[/B] Will add or remove a tab infront of every selected line, allowing you to quickly indent or unindent a block of code. Indent selection works automatically by using the Tab key if multiple lines are selected. Unindent selection works by using Shift+Tab (also works on one line).
[/li][li]Convert to Lowercase: Will convert selected text to Lowercase.
[/li][/ul]
[/list]

There are still some known bugs but they are reducing fast.
I have also started to work some more on the Entity Import function that will list all used targetnames, scriptnames and targets in your map (if the .map file is available).


(Flippy) #27

New updates:

[ul][li]Added a rightclick context menu with default functions like copy/paste/select all etc, and also a new function: “Show Intel on …”. When you rightclick on a word in the text, it will say “Show Intel on [word]” and when you click it, the Scriptcommands treeview will open and select the selected word (if it’s a keyword in the treeview) and show you the description and usage.[/li][li]Changed the way ETScript opens and saves files again:[/li][list][li]Open file: You can no longer select both .etscript and .script files at the same time. You now have the option to open an .etscript file OR a .script file.[/li]Whenever you open an .etscript file, it will open as usual (without loading time).
When you open a .script file, it will first load the script file and colorize it (with loading time), then save it to an etscript file (or overwrite the existing etscript file after confirmation) and open that etscript file.
So you are still never editing a .script file directly.
[li]Save file: You can no longer save both .etscript and .script files at the same time.[/li]When you save normally, you will only save the .etscript file.
When you want to save the contents of your .etscript file to the corresponding .script file, you select “Save As W:ET Script file” and it will save the .script file.
[/ul]
[/list]

Reason for the open/save changes is that there were simply too many things that could go wrong with the automatic system I thought up. When you open the script file in notepad once and change it, the whole system doesn’t work anymore. So I decided to do this as a compromise.

There are still some bugs… When you open a script file it doens’t always show the contents, sometimes it’s just gray for some strange reason…

I also finally found a way to create a normal setup wizard.


(Paul) #28

You made it yourself :O?


(Flippy) #29

Yep. Was made using VisualBasic .NET 2008.
There are better and faster languages, but I don’t know them that well so I used VB :stuck_out_tongue: