## Color Scheme Management Tool

Display customization and font issues

### Color Scheme Management Tool

UltraEdit Companion Utility
Platform: Windows 2000, Windows XP, Windows Vista, and Windows 7. 32-bit and 64-bit compatible, though 32-bit program.
Supports: UltraEdit 15 through 18.10 and UEStudio 9.10 through 12.10

As of August 29, 2012, this Software has changed the license! See the new License Agreement for details.

Description:
This program was created to help create/manage/share color schemes and syntax highlighting schemes for UltraEdit 15+ and UEStudio 9.10+. Since the original release, new features have been added for the direct manipulation of IDM Wordfiles to make it easier for users to make changes to, update, or make corrections to their wordfiles in a manner which is more intuitive. There are well over 1300 themes available for download for use with this program and UE/UES.

View Change Log ... View Online User Guide

Key Features:
• Create/Load/Save Color Schemes in a special text file format to make it easier for human reading.
• Import/Export from/to UltraEdit/UEStudio for both Color Schemes and Wordfile Colors.
• Export wordfile colors to one or multiple wordfiles.
• Clear all color information from one or multiple wordfiles.
• Split a multi-language wordfile into separate wordfiles.
• Drag and drop color scheme files onto the program or program's icon to load a color scheme.
• Can associate *.ueTheme (UltraEdit Theme) files with this program to allow opening color schemes by double clicking from Windows explorer.
• Imports/Exports Font name/size to UE and to Themes.
• Sorts words, tests for duplicate words, tests for invalid words in wordfiles.
• Allows direct editing of the Language Definition line through the Language Definition tab.

• Back up your UltraEdit Directory before using this program as it will make changes to some of your files.
• Do not run this program while UltraEdit is open. Close UltraEdit first!
• This program only works if you do NOT use the Registry.
• This program only works if your wordfiles are separated. That is, one programming language per wordfile. Fortunately, this program provides a function to split a multi-language wordfile into separate files.

Known Issues:
• Saving Changes on the Language Definition Tab within the Word File Tools causes UE to stop highlighting comments. A work-around is to add a space to the end of the comment character(s), or re-integrate comment strings into the first line. It is recommended that you do not use the Language Definition Tab.

Work on this project has been halted. I simply do not have time to work on it, but do hope to pick up work on it again in the future. However, life at home has become too busy for me to invest any further time into this or any other projects at this point in time.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

http://www.vi-improved.org/color_sampler_pack/

Looking forward to an easier way to create themes in UE.
ShakiestNerd
Newbie

Posts: 2
Joined: Fri Oct 17, 2008 1:56 pm

### Re: Color Scheme Management Tool

Nice link, ShakiestNerd. I may have to convert a few of those for myself.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

Good to see you still plugging away at this, some very nice enhancements.

If you ever figure out a nice way to import Visual Studio schemes here is a nice collection to checkout. [Linky]

Nologic
Basic User

Posts: 24
Joined: Sat Feb 19, 2005 12:00 am

### Re: Color Scheme Management Tool

A couple of observations about the tool:

• It saves the *.ueTheme files in the program directory. That's likely to cause problems on Windows Vista or later. The program directory is (supposed to be) read-only; software should use %APPDATA% instead.

Actually, you can select the directory, as it pulls up a save dialog box to allow you to select where to save it. It will remember the "last place" a theme was used, so once you've selected the first time "where" you want to keep your schemes, it will save them there from then on unless you change it again. I will look into changing this to "My Documents" or something similar in a future release.

Good to know. I've moved mine under %APPDATA%\IDMComp\UltraEdit\themes. That wouldn't be a good default for you to use, but for me it means that all my UE data is together and my existing backup process will catch it.

• The author and description fields don't appear to load/save correctly in version 1.7.2.1004.

This was to be features that would be utilized with other features that I was planning in a future release, and haven't gotten around to it. I will address getting this loaded/saved properly in the next release.

I used this to create UE versions of the Solarized theme. Here's my take on the Solarized theme for UltraEdit:
Attachments
Solarized.zip
Solarized light & dark themes for UE.

mjcarman
Power User

Posts: 124
Joined: Thu Feb 10, 2005 12:00 am

### Re: Color Scheme Management Tool

I have decided that I will pick up work again on this tool.

However, a great portion of the code will need to be rewritten, as I have discovered some basic flaws which, while not a problem with any wordfiles that exist that I have seen (I have downloaded and viewed all on IDM's site), I have discovered it is possible to create a wordfile that will give a problem to my tool.

I have discovered that UE will accept a wordfile if you SKIP a color group. That is:
Code: Select all
/C1"Control Structures"/C2"Tags"/C5"Operators"

/C3, for example, can be missing, but the wordfile will still work fine without it, and /C5 will be correctly highlighted. Therefore, code needs to be rewritten for reading/writing the wordfiles to be more in line with how UE does it. Mofi, if you could let me know if UE will encounter any issues if those groups are left out, I'd appreciate it.

Another question that I have been wondering, as I think about the redesign. Should I begin to add the entire list of color groups to the wordfiles, say, /C1 through /C20. Unused groups could simply be named as such:
Code: Select all
/C19"not used"/C20"not used"

Or does the description need to be unique? Like:
Code: Select all
/C19"not used 19"/C20"not used 20"

The reason for this line of thinking is that setting up the lines in a wordfile with additional color groups might be helpful for some who would like to "split" some of the color groups into multiple groups. I know there are a few languages that I use where it seems that several sections that seem to be "multiple" groups were initially merged to one to make them fit the 8 original color groups. This would help me to copy/paste a few items around to create more highlighting. It would also help to maintain the entire list of colors within a theme, should you need to export, since I am unaware of any wordfiles as of yet using all 20 color groups.

When I make the update, I'll need to make sure I include all the new colors available for UE 18, which will include the Auto-suggest template colors and Template placeholder colors. I haven't looked for those in the INI file yet. Hopefully they will be easy to find. Mofi, if you know where they are, or the key names and section for them, it would be appreciated as I am fairly busy and won't be available until next week to actually get to the INI file. I'm just making notes on what needs to be done this morning, then hopefully can start this project in the next week or so.

Thanks for any feedback in advance.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

It is no problem to skip color group numbers. Users can do that if always the same 8 (or now 20) color settings are used for all languages and there is no need for a specific color in one language.

The versions of UltraEdit working with color settings stored in uedit32.ini really evaluate the color number and show in the color group drop down list Word List x for any of the 8 supported color groups not found in the wordfile. That's the reason why I used /Cx"Cx not used" in the wordfiles created for myself.

Since the color settings of the color groups are stored in the wordfiles at the same line as /Cx"...", UltraEdit ignores the color group number completely and simply applies current color group index number to every /Cx"..." found at beginning of a line in the wordfile. In other words if a wordfile contains

/C1"group 1"
/C5"group 5"
/C3"group 3"

/C1"group 1"
/C2"group 2"
/C3"group 3"

Nowadays none present color groups are not listed anymore with a default string in the drop down list in the syntax highlighting configuration dialog. Therefore it is no good idea to save into a wordfile color group definitions with a default string value.

Mofi
Grand Master

Posts: 4058
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

### Re: Color Scheme Management Tool

I was thinking about setting up command line parameters for this program, since I am having to do a rewrite anyway. It will be easier to implement it now, than have to rewrite it again in the future. I was wondering if anyone thought the effort to do this would be worthwhile. The following is what I had in mind:

-t "path/to/theme/file.uetheme"
Loads a theme for editing, or specifies a theme to work with other switches.

-w "path/to/wordfile.uew"
Specifies a wordfile to work with. Can be used multiple times to specify more than one for special operations like applying a theme, stripping colors, sorting, etc. Does not work without a switch that needs a wordfile to work with.

-wp "path/to/wordfiles"
Specifies (overrides) the wordfile directory to use. If opening the program, it will put this in the Alternate Wordfile Location box to override the INI settings.

-ueini "path/to/ue/ini/uedit.ini"
specifies the UE configuration file to use. Useful for batch file launching when wanting to work with UEStudio and UEP at the same time, and you plan to use multiple instances. It invokes a temporary change to this path, and acts as an override to the program's configuration file, but does not update the program's configuration file. This will allow a user to work with multiple copies of UE/UES/UEP on their system by allowing them to create a batch file to launch for each one.

-apply
If theme and wordfile are specified, it applies the theme to the wordfile. If theme and wordfile path are specified, applies theme to all wordfiles in that directory. Will launch new instance and then exit.

-applydefault
Applies a specified theme to all wordfiles pointed to by the uedit.ini file which is located by the uecompanion.ini file. No need to specify the location if it is already setup in the program and you want to use that location. Will launch new instance and then exit.

-stripcolors
if -w or -wp are specified (only one of these flags), then it will strip the color information from the wordfile or wordfiles in that path. Will launch new instance and then exit.

-sort
if -w or -wp are specified, then it will perform a Sort Language's Words to the wordfile or wordfiles pointed to. Will launch new instance and then exit.

-duplicatetest
Checks wordfile(s) from -w or -wp for duplicate words. Report is sent to console output instead of a pop-up box like in the program. This makes it so that UE can capture the output and place it in the output window. Will launch new instance and then exit.

-invalidtest
Tests wordfile(s) from -w or -wp for invalid words and sends report to console.

-combine "path/to/new/wordfile.txt"
Will take up to the first 20 wordfiles in the directory specified by -wp and combine them into one single wordfile, specified after the -combine switch. Will launch new instance and then exit.

-cini "path/to/alternate/uecompanion.ini"
This allows you to specify a filename of an INI file for the UE Companion Utility to use besides the "uecompanion.ini" file that it normally uses. This allows you to use different configurations in different settings. If a filename without a path is specified, it will look in the UE Companion Utility's executable path for the file. Otherwise, specify the full path name.

Any time the program runs an operation against a wordfile and then exits, it will report to the console how many files were changed.

An example might be: (if uecompanion is included in the "path" environment variable)
Code: Select all
C:\>uecompanion.exe -applyall -t "C:\uethemes\tangodark.uetheme"14 wordfiles updated.C:\>uecompanion.exe -sort -w "C:\path\to\appdata\IDMComp\UltraEdit\wordfiles\javascript.uew"1 wordfile sorted.C:\>uecompanion.exe -duplicatetest -w "C:\path\to\appdata\IDMComp\UltraEdit\wordfiles\mynewwordfile.uew"The following duplicate words were found:base -> C1 C6trust -> C3 C7 C8C:\>

These would allow many of the program's features to be run as a tool within UE for working with wordfiles, and could conceivable replace Mofi's syntax tools completely, since they could be run from within UE against a single file within UE, or against multiple files. It would also be much faster than the macros, due to the nature of the macros.

Is this a fairly complete list of what should be made available, or have I missed anything someone considers important for this program to do?

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

See Template for Language File for information which version of UltraEdit/UEStudio supports which keyphrases and keywords in a wordfile. Missing is only the hierarchical function string definitions supported by UE v16.00 and UES v10.00.

In general the parsing for the keyhprases and keywords is very simple. The first line is of special interest and all lines starting with a slash character.

First line must start with /L followed by a number. The number is of no importance anymore for those versions of UltraEdit which store and read the color and font style settings from the wordfile. Next the name for the language in double quotes should follow. I think the name is optional, but a language definition without a name for the language is in general no good idea from the wordfile creator.

Every space separated string after case sensitive keyhprases File Extensions = or File Names = is interpreted as file extension or file name definition.

The string between name of the language (or language number) and file extensions/names is searched for other known keyphrases or keywords. Strings not known by a version of UltraEdit are ignored like the language marker keywords for all versions of UltraEdit prior version 11.00. Also misspelled keywords like NoCase are ignored or language marker strings invented by the wordfile creator.

Lines starting with a slash character are compared with the known keyphrases at beginning of a line. // is interpreted as line with words starting with slash character. /Lxx and /Cxx are well known. Lines starting with a slash character and word(s) not known by the version of UltraEdit are ignored. Therefore the lines with the general color settings are no problem for older versions of UE/UES not supporting them. Those versions simply ignore those lines.

Also everything after color group number and optional color group name in double quotes is ignored by older versions of UE not supporting the style keywords and color and font style settings.

I have never tried if more than 20 languages in one wordfile is possible for versions of UE/UES with unlimited support of wordfiles in a directory. I would expect that but my main wordfile containing multiple languages has only 18 languages and I have simply never tried it because of no reason to do that.

Well, because of language template support of UE v18.00 working only for *.uew files in a wordfiles directory I have split my single wordfile up now also into *.uew files with just 1 language within.

I have also never tried what happens when having more than 8 color groups in a wordfile in versions of UE/UES supporting only up to 8 color groups. But I could do that if you want to know it.

The command line switches could be useful for system administrators who want to update wordfiles of many UE/UES users.

I doubt that a single user would make use of it. My experience with usage of tools with command line switches is that normal users don't use it if the same program offers also a grahpic user interface. It is no problem to have your tool open, run the test for duplicate and invalid words, switch back to UltraEdit to fix them in the wordfile, save the wordfile, switch back to your tool and run the tests again. I don't think that a normal user reads your documentation for the tool about the command line switches, configures user tools to run sort, test for duplicates and test for invalids and make use of the user tools. It happens to rarely that a wordfile is created completely or is enhanced.

In my opinion adding support for command line switches would be a waste of time for you. Even I would not configure user tools to run your tool for sorting and testing a wordfile because I need it only regularly.

Also I think the command line switches -duplicatetest and -invalidtest could be hard to realize if the output of the tool to console window should be captured by UltraEdit. That would require that your tool is primary a console application where in user tool configuration of UltraEdit Dos Program need to be selected and if other switches or no switches are used, an embedded GUI version of your tool is started. Regedit.exe is such a program which is at the same time a console application and a GUI application. I don't know if you have experience with such applications. I have once read articles how to create an application which are primary console applications but are secondary also GUI applications. That is really difficult to achieve except 2 EXEs are used, the console application and a GUI application called by the console application if GUI version should be used according to the parameters passed to console version. Having both in same file as Regedit.exe is really, really difficult from what I read.

Please note that there is a big difference between a console application and a GUI application. Windows automatically detects on header of the EXE to start if it is a console application or a GUI application. For a console application cmd.exe is called first to open a console window and start the console application within the console environment. (For 16-bit DOS applications NTVM is used instead of cmd.exe.) A GUI application is started simply as a new process. Further cmd.exe halts on processing until the called console application finished while when a GUI application is started from within a console window cmd.exe immediately continues after starting the GUI application. You can easily see the difference if you run from within a batch file once a console and once a GUI application. Cmd.exe processing the batch file terminates immediately after starting the GUI application while batch file processing is halted until the called console application has terminated itself.

If your tool is primary a GUI application which can output lines also to a console window, UltraEdit could not capture it, except your tool is called via a batch file calling your tool with start command with parameter /wait.

Mofi
Grand Master

Posts: 4058
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

### Re: Color Scheme Management Tool

Version 2.0.0.1364 is out.
• Fixed an issue where locating UltraEdit's INI file through the environment variable UEINIDIR was failing. Fixed same for UEStudio.
• Fixed screen position when starting UE Companion so that it is not always in upper left.
• Fixed issue where Background Auto in "Normal Text", "Comments", "Alt Block Comm", "Strings", and "Numbers" was not being loaded correctly from wordfiles or themes. Now correctly loads from wordfiles and the new style themes. As old format of themes are no longer supported, the fix will not be implemented for that theme format.
• Fixed an issue where UE Companion would not recognize upgrades or new installations of UltraEdit and/or UEStudio. For example, if you had UE, and installed UES, it would not recognize UES had been installed. If you upgraded from UE version 15 to version 18, it would not recognize the upgrade. It now recognizes upgrades, new installations, and will automatically remove uninstalled programs as well.

This release does not yet contain the "version stamping" of the theme files, though it is already implemented. That implementation is still in an internal build for later release, as are other features.

Version 2.0.0.1367
released (within minutes of the 1364)
Fixed an issue with Save and Save As where it was not recognizing the file has not been changed since last save.

Updated to Version 2.1.0.1410
on April 9, 2012
• Added portability to the program. It will now pair with UEPortable if you make it portable and follow the instructions on the Configuration->Pairing with UE/UES tab. It will automatically detect and adapt when the drive it resides on changes drive letters.
• Added the ability to automatically detect different UE installations on different computers. Moving from computer to computer in portable mode should not reflect the installations of UE or UES on that particular computer, and, if UEP is on the portable drive with UltraEdit Companion, and the instructions were followed to place it properly, then it should detect that as well.
• The program will now detect if the version of UE/UES/UEP you are trying to make changes to is running before it attempts to make those changes. It gives you an opportunity to close it before continuing, or it will cancel making changes.
• Several bug fixes made to the program.

There is a separate download link for the portable version, which is just a zipped version without the installer and it includes an empty uecompanion.ini file for easier installation.

A Few Notes about the Portable Version
The Portable Version will be updated every time the installer version is updated. See changelog.

The Portable Version is exactly like the UltraEdit Companion utility, except without the installer. You can unzip it to your USB drive to PortableApps/uecompanion and it will be able to detect UEPortable from that location. It has a blank uecompanion.ini file with the executable to get you started, as placing this in the program's directory is what initiates the portable mode.

It is stealth when used in portable mode if you do not enable file associations. You should not enable file associations unless you are permanently installing this program. Instead, use the Portable File Associator available at the PortableApps.com website.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

The portable version will no longer come in a zip file. It now comes in a full PortableApps.com installer, just like UltraEdit Portable. When you install it to the PortableApps path on the same drive as UEP, it will detect it, find it, and allow you to work with it. It now automatically disables also the File Association buttons.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

Nologic wrote:If you ever figure out a nice way to import Visual Studio schemes here is a nice collection to checkout. [Linky]

Please by all means find a way to share that color scheme we need a lot more...as there are a lot of folks with different tastes...and that is a very nice scheme.

Well, I finally did it. I converted every Visual Studio scheme available from that link you provided, as of April 10, 2012 (when I downloaded them all, one by one.)

They converted themes are on the Theme List if you visit that from the first post in this topic.

As these are an automated conversion, and Visual Studio and UltraEdit do not have all the same elements for colors/highlighting, it was not possible for an exact conversion, so I tried to get it as close as possible. There are a number of themes that were created by people that did not even bother to color all the elements (as some don't use them all, so only colored what they used.) However, a large majority of these have a complete color set, and is usable as is. Please preview the ones before you use it. Download the latest version and previewing will be much easier, as you can select from a list displayed next to the colors, and see the results pretty much immediately.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

@ rhapdog -

Wow you have come a long ways with this app...major kudo's also many thanks for converting over so many schemes.

Now I've noticed some odd control painting issues on the following tabs "syntax coloring", "color scheme", and "configuration"...other than that so far everything looks good.

Nologic
Basic User

Posts: 24
Joined: Sat Feb 19, 2005 12:00 am

### Re: Color Scheme Management Tool

Well, Nologic, I'll have to give some credit to you. It was your porting of Tango Dark that got me interested in doing this. Well, that and UE 15 totally changing up the way colors worked in Syntax Highlighting files, and needing an "easier than a macro" way of handling it.

I'm not sure what you mean by "odd control painting issues" on those tabs.

At any rate, I'll be working on the User Guide this week, and am hoping to have it online by the weekend. After that, I have a few other ideas to try to streamline things and make it easier to work with and manipulate the colors.

For starters, I was wanting to program it where you can "right click" on any of the color boxes, and either copy, paste, or directly edit the color. Right click copy, then right click paste could make it easier to move colors around.

I'm also considering adding a configuration option to "load the first 36 unique colors" into the custom color palette whenever you open a theme, import from UE, or import from VS2010. For most themes this will give you all the colors the theme uses, or most of them. I know there are like 80 possible distinct separate colors, but as 34 of those are background colors, and most themes repeat a number of elements with the same colors, it should catch most of the unique colors in each theme. If it doesn't, then I may increase the number of colors on the custom palette.

Also, still need to get Update Checks working again, and numerous other new features for manipulating wordfiles that are going to be great for wordfile creators.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

### Re: Color Scheme Management Tool

Released version 2.4.0.1661

New Features:
* Added Right Click functionality to color boxes in Syntax Coloring and Color Scheme tabs. The color boxes now allow "copy", "paste", "invert color", and "blend current color with color on clipboard." The clipboard functionality is only within the program, and it does not support copy/paste of colors/values outside of the program due to different ways color information is handled by different programs.
* Added HTML Help files for the program, accessible from the Help menu. It will launch in your default browser.

Bug Fixes:
* Fixed an issue where certain controls were not being painted properly in certain windows themes.
* Fixed the problem where Last Opened File, although opened, was not showing as selected in the Theme Panel.

rhapdog
Master

Posts: 265
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

Next