x
ETF2L is looking for new Staff to recruit! Are you interested in supporting the league? Then click here for more details on what we can offer and how to apply! 

Forum

4's Script Editor (Syntax highlighting + Auto completion)

Created 2nd June 2013 @ 12:31

Add A Reply Pages: 1 2 Next »

four

(copied from http://teamfortress.tv/forum/thread/8782)
Support me by joining the steam group :3

Hey I’m four and I’ve always liked Juzz’s script editor link so since he doesn’t seam to be updating this anymore I decided to write my own one. My goal is to write a small handy tool with small features that make scripting for tf2 easier. I don’t wanna give this tool a shitload of features but smaller ones that actually improve the flow of coding.

I wrote it in c# and works on Windows.

Most features of the tool:
– Auto-completion
– Tabbed editor for all cfg files
– Advanced Syntax highlighting
– Highlighting of same words
– Rectangular selection
– Dialogs to easily insert loops and toggles
– File Blacklist
– Find/Replace
– Batch add to selected files
– Backups
– Add numpad key names by pressing Ctrl+Numpad
– A Person who is willing to keep this tool up to date

Screenshots:
– Editor with highlighting and auto-complete menu
puu.sh/3b2e7

– Editor with dark theme:
puu.sh/3Et8c.png

– Insert loop menu
puu.sh/34mfq

– Batch add menu
puu.sh/34mgc

Handy hotkeys:
– F1 / F3: changes tabs
– Ctrl+F1 / Ctrl+F3: goes to the previous/next search
– Ctrl+Numpad: to insert the name of the key
– Ctrl+(1-9): select the classfile (e.g. Ctrl+1 -> scout.cfg)
– Ctrl+Shift+C: Comment/Uncomment line
– Ctrl+Backspace: Delete whoel word (pretty Windows standard)
The obvious hotkeys should be visible in the tool itself by hovering over the icon.

Download:
directlink

This program uses the opensource project fastColoredTextBox and it’s source can be downloaded here.

You need to have at least .Net framework 2.0 installed but it should be already installed on you pc (if not google it).

Please be picky and tell me any error/bug you find. Even if it is just a typo or a wrong tab index.
I’ve bugtested every feature of the tool but there is always a possibility that another one exists!
If you wanna help me, you can share this post in other forums <3


Last edited by four,

Spike Himself

TC

when i start the program, it correctly identifies the fact that i do not have tf2 installed on this pc. it then asks me to select the cfg dir. i dont have a cfg dir, so i select a random other folder, and that throws an “argument out of range” exception

also please consider using OpenFileDialog instead of FolderBrowserDialog. I know it’s not really the correct way to have the user select a directory (because Microsoft thought it would be a good idea to let users forget that a directory is a file too, and call it a Folder instead……..), but the folderbrowser is so annoying to use.. I just want to copy/paste a path, not click to open computer, click to open drive, click to open folder, click to open folder, click to open folder, click to open folder, .. :(


Last edited by Spike Himself,

four

Quoted from Spike Himself

read it ^

Thanks for reporting that, I’ve never actually tested what happens if the selected folder doesn’t contain any .cfg files and I’m gonna try to fix it at all possible places in the next release. Selecting a folder which has at least one .cfg file will fix it if you just want to try it out or something.

Using an OpenFileDialog is not really a good way of searching for folders. I’ll probably add a proper one when I add multiple games support. That should be soon~


Last edited by four,

four

.: Update v3 :.

– added auto-completion :D
– improved the toggle function of loops
– the settings editor now automaticly aplies changes
– fixed minor issues

note that the auto-completion allows all commands found on the valve developer site + newer ones from the tf2 changelog


Last edited by four,

four

.: Update (v3.1) :.

– I revised the ui and fixed some smaller mistakes
– Added rcon command support
– Added autocompletion for keys and maps (also unbind)
– Added gui options
– Improved autocompletion
– Same word highlighting is now finished

4Script scans your installed maps at the start.
Tell me if you want anything else in the options.

zen1th

Pander
LEGO

I really like this, especially the batch editing function.

A couple things bug me though, every time I open the program it asks me for the cfg dir. If I just close that dialog without browsing to the cfg dir it properly opens up correct dir, as last time I opened the program.

And a minor annoyance, the actual window resets size every time. It would be nice if it could remember the size so I don’t always have to make it bigger.

Really nice program though, good work :)

Mundi

dogs.tf

download doesn’t work

four

Quoted from zen1th

A couple things bug me though, every time I open the program it asks me for the cfg dir. If I just close that dialog without browsing to the cfg dir it properly opens up correct dir, as last time I opened the program.

I don’t see why it would ask you for the tf2 path again since the value gets stored in the 4Script.Settings file. I’ll add you and try to figure out why that happened because I have no idea :/
edit: It probably never worked to begin with and always took the default paths :P

The window size (and position) is actually easy to implement because I already wrote the code for my (yet unreleased) Hud editor.


Last edited by four,

four

.: Update v3.2 :.
– Fixed 4Script using the default script path even though another one is saved in the settings
– Added images to the autocompletion
(Blue cube means variable, red cube means command, and green cube means alias)
– Autocompletion now shows the default values of variables (taken from the valve dev page)
– Improved incrementvar and key autocompletion
– The autocomplete-menu now hides when ctrl is pressed

– Request: There are now options to save the window size and location when closing 4Script


Last edited by four,

four

I just wanted to point out that you can join my steam group if you wanna support 4Script!

four

.: Update v3.3 :.
– Fixed wrong auto completion menu showing up after alias/bind
– Fixed the auto completion not appearing after the first ; of an alias/bind
– Added recording mode beta (Thread coming soon)

four

I misposted :E


Last edited by four,

four

.:Update v4:.
Link to the new updater! (Put it in the directory you want 4Script in! There is no path dialog!)

FIX:
– Removed the Ctrl + Del Hotkey that adds “KP_DEL” to allow deleting whole words with the hotkey

FEATURES:
– Added an option to scan subfolders as well! (request)
– Added the auto updater!
– The undo steps now get remembered when changing tabs!

GAMES:
– Added multiple game support
– Added support for Dota2

– Updated “Team Fortress 2.txt” (auto completion)
– – added “mat_phong 0”
– – added “oculus_use_ovr_distortion 0”
– – added “tf_hud_show_servertimelimit 0”


Last edited by four,

four

.:Update v4.1:.
FEATURES:
– Added Theme System
Added Dark Theme
– Added Macros just for the sake of it being easy to implement
– New Layout for the Settings menu + new Blacklist editor

FIX:
– Removed the search/replace bar at the bottom since it it somehow broken :/ (4Script now uses the fctb search/replace dialog)
– Made the fastColoredTextBox binary compatible with my (yet not released) Hud Editor
– Fixed 4Script restarting after an update even if the Restart button wasn’t pressed

four

.:Update v4.2:.
– 4Script now opens external files!
– Added option in settings to make 4Script the default .cfg editor.

image


Last edited by four,

Add A Reply Pages: 1 2 Next »