2362
MasterMaster
2362

    Apr 16, 2009#16

    I hope they will be helpful to others as well.

    It took a bit of time to write them, but not as long as it would have to get all my wordfiles the way I wanted them.

    My macros only work if the wordfiles are one file per language, and do not work with multi-language wordfiles.
    “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

    2
    NewbieNewbie
    2

      Nov 25, 2009#17

      Hi all.

      I just registred to this forum to ask a super simple question : is it possible to one of you to post the complete code to make tango black working in UE15 ?

      I just installed UE as I have to work in Coldfusion and don't like the CF official editor... if I am able to make UE15 look as I want (something like tango black), I plan to purchase UE for my job... but I need something more clean than the default black on white eye blooding editor scheme...

      thanks!

      6,614548
      Grand MasterGrand Master
      6,614548

        Nov 26, 2009#18

        Step by step instruction for UE v15.00 and later with multiple wordfiles in a wordfile directory:
        1. Download UE15 Syntax Color Helpers ZIP package from rhapdog referenced on his post on the first page of the topic containing the color schemes created by Nologic. Unpack the files in this archive to a temporary directory.
        2. Copy into the address bar of Windows Explorer the directory path %appdata%\IDMComp\UltraEdit and press key RETURN or ENTER to open this folder in Windows Explorer. While no instance of UltraEdit is running, create a copy of uedit32.ini in the same folder.
        3. Open the copy of uedit32.ini with UltraEdit and also open the file TangoDark.uecs from the ZIP file.
        4. Make the INI file the active file, press Ctrl+F and search for User Color Schemes. If no line with this section name is found, you can simply copy content of TangoDark.uecs to the INI file at top or bottom. If a section [User Color Schemes] already exists, insert only line 2 and 3 from TangoDark.uecs into the INI file below the existing lines of this section and adapt the numbers left the equal sign accordingly.
        5. Save the modified copy of the INI file, close both files and close UltraEdit.
        6. Back in Windows Explorer delete now uedit32.ini and then rename the modified copy of uedit32.ini to uedit32.ini.
        7. Start UltraEdit again, open View - Set Colors, select the scheme Tango Dark or Tango Dark Alt and close the dialog with pressing button OK.
        First part is done now for the general color scheme. The second part is for the syntax highlighted files.
        1. Open the file TangoDark.uesh from the ZIP archive.
          Note: rhapdog has written some instructions how to apply all the settings, so I'm writting here more or less the same again.
        2. Open Macro - Load, browse to the macro file UE Syntax Color Helpers.MAC and open it.
        3. In Windows Explorer the directory with all the configuration files should be still displayed. This directory contains a subfolder named wordfiles. Open this subfolder.
        4. Drag and drop the (first) wordfile you use into the UltraEdit window to open it.
          Note: Users updated from UE prior v15.00 have to open the single wordfile with multiple languages instead of any wordfile in this directory. See Advanced - Configuration - Editor Display - Syntax Highlighting if a directory or a wordfile is defined.
        5. Click on Macro - Play Any/Multiple Times, select the macro Import Colors and without changing anything else press the button OK to execute the macro.
        6. You should have now the wordfile with the colors from the file TangoDark.uesh. Save the wordfile (as ASCII/ANSI file with DOS line endings) and close it.
        7. Redo the steps 4 to 6 for all other wordfiles you use. You can run for the other wordfiles the macro more quickly now with Macro - Play Again.
        8. When finished with updating the color settings in the wordfile(s), restart UltraEdit.
        Extra Hint: As rhapdog has written in his instructions his import macro can be used only for wordfiles containing only 1 language and only the wordfile and the file with the color settings should be open when running the macro. Later I have developed a set of (more powerful) macros to manage wordfiles and their settings, see the ultimate macros to manage wordfiles and their color settings. The ZIP file you can download there from the IDM server contains not only the macro file with all the macros, but also the HTML file LanguageSettings.htm with all the details about the color and font style settings in the wordfile and how to use my macros with step by step descriptions.
        Best regards from an UC/UE/UES for Windows user from Austria

        2
        NewbieNewbie
        2

          Nov 27, 2009#19

          Wow!

          Thanks a lot! I will definitively use UE15 now!
          I can't say enough thank to you to make a step by step instruction!

          :lol: 8)

          1
          NewbieNewbie
          1

            Dec 22, 2009#20

            Ppl,

            I noticed the following things that might puzzle people.
            - Each wordfile can overwrite the info in the INI file. So if the editing of the INI file doesn't work, open up the uew and look for /Colors = ... etc.
            IT SEEEEEEMS... the number of values there is less than what you have in the INI, so a direct copy & paste won't work...
            - UE can alternatively save settings to the registry, not the INI file. It's in the Configuration > Application Layout > Advanced parameters setting.

            Thanks for the great blogpost otherwise.

            6,614548
            Grand MasterGrand Master
            6,614548

              Dec 22, 2009#21

              hwaarl, have you read also my last post, see above. It explains step by step how to apply the Tango Dark color scheme to the INI file as well as to the syntax highlighting wordfiles used by you. And the last link in my post points you to my macro set for managing the color and font style settings in the wordfiles which contain also a detailed description about the various storage formats (including registry) for the color and font style settings of the wordfiles.
              Best regards from an UC/UE/UES for Windows user from Austria

              2362
              MasterMaster
              2362

                Dec 22, 2009#22

                Mofi, (or anyone else who can answer this)

                Concerning the step listed in your post above, giving full step by step instructions:
                7. Start UltraEdit again, open View - Set Colors, select the scheme Tango Dark or Tango Dark Alt and close the dialog with pressing button OK.
                Is there a way to edit this directly in the INI file without having to start UltraEdit/UEStudio so that the Tango Dark or Tango Dark Alt (or whatever scheme you want) can be already selected? I wasn't able to find it, and it would be helpful to me.

                The reason I ask is this... I was considering writing a standalone utility that could "import/export" color schemes, which would include setting this part of it. Currently, we have to run macros one at a time, and manually edit the INI file, then manually select the scheme in configuration, etc. I would like to write a utility that would "automate" the process completely, where it would alter the INI file AND the appropriate wordfiles (where you can select a single wordfile from a list, multiple wordfiles, or all wordfiles).

                It's easy enough to read the INI file and see where the wordfiles are stored, then retrieve that directory for manipulation. I would like to do this on a cross-platform language where color schemes can be shared between UEStudio, UE, and UEx users. Then perhaps people can actually share their color schemes.

                The only things holding me back from even starting are:
                • The location in the INI file where to state which color scheme is actually used.
                • How busy I am during the Christmas holidays (but I can get started after the holidays if I can just get that location and a "how-to" on editing it!)
                “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                6,614548
                Grand MasterGrand Master
                6,614548

                  Dec 23, 2009#23

                  I played a little with the general color settings this morning to find the information you need.

                  There is no setting which selects one of the available user color schemes as active color scheme. Instead the colors of a user color scheme are copied to the INI entry holding the colors of the active color scheme when selecting a user color scheme and closing the configuration dialog with button OK. Here are the missing information you need to write your program.

                  Index table for Colors= in section [Settings] holding the colors of the active color scheme.

                  Code: Select all

                  Index   Item
                  ----------------------------------------------------
                   0, 1   Plain Text Background
                   2, 3   Bookmarks
                   4, 5   Plain Text
                   6, 7   Selected Text
                   8, 9   Selected Text Background
                  10,11   Ruler, Line Number Column Background
                  12,13   Ruler, Line Number Column
                  14,15   Active Line
                  16,17   Active Line Background
                  18,19   Column Marker
                  20,21   Brace Highlight
                  22,23   Folding Background
                  24,25   Workspace Manager / Output Window
                  26,27   Workspace Manager / Output Window Background
                  28,29   Spaces, Tabs, Line Ends
                  First number (even index) can only have the values 0 or 1. 0 is for default color, 1 for custom color. If first number is 0 of a setting pair, second number is also 0. If first number is 1, second number is the BGR value (= blue * 65536 + green * 256 + red). The values are separated by commas.

                  The default color scheme as customized active color scheme would be:

                  Code: Select all

                  Colors=1,16777215,1,16776960,1,0,1,16777215,1,6956042,1,15461613,1,0,1,16711680,1,16640196,1,0,1,14474460,1,16119285,1,0,1,16777215,1,13882323
                  Tango Dark as active color scheme is:

                  Code: Select all

                  Colors=1,3552302,1,164,1,13621203,1,15527662,1,8751752,1,0,1,13621203,1,13621203,1,5461845,1,1776151,1,8751752,1,1776151,1,13621203,1,3552302,1,8081525
                  Tango Dark Alt as active color scheme is:

                  Code: Select all

                  Colors=1,3552302,1,164,1,13621203,1,15527662,1,8751752,1,0,1,13621203,1,13621203,1,2631458,1,1776151,1,5461845,1,1776151,1,13621203,1,3552302,1,8081525
                  Index table for a color scheme in section [User Color Schemes]

                  Code: Select all

                  Index   Item
                  ----------------------------------------------------
                    0     Name of the color scheme
                    1     Plain Text
                    2     Plain Text Background
                    3     Selected Text
                    4     Selected Text Background
                    5     Active Line
                    6     Active Line Background
                    7     Spaces, Tabs, Line Ends
                    8     (Plain Text Background)
                    9     Ruler, Line Number Column
                   10     Ruler, Line Number Column Background
                   11     Workspace Manager / Output Window
                   12     Workspace Manager / Output Window Background
                   13     (Plain Text)
                   14     Bookmarks
                   15     (Plain Text Background)
                   16     Column Marker
                   17     (Plain Text)
                   18     Brace Highlight
                   19     (Plain Text)
                   20     Folding Background
                  The values in round brackets are copies. Making these values different to the referenced value has no affect. So make sure that the values of the copies match with the appropriate original value to avoid problems. The values are separated by semicolons.

                  The default color scheme as customized user color scheme is:

                  Code: Select all

                  0=Default Scheme;0;16777215;16777215;6956042;16711680;16640196;13882323;16777215;0;15461613;0;16777215;0;16776960;16777215;0;0;14474460;0;16119285
                  Best regards from an UC/UE/UES for Windows user from Austria

                  2362
                  MasterMaster
                  2362

                    Dec 23, 2009#24

                    Mofi,

                    Thank you so much for that research and info. That's exactly what I need to be able to program a solution.
                    “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                    6,614548
                    Grand MasterGrand Master
                    6,614548

                      Dec 23, 2009#25

                      Most difficult part for your external tool is surely to find the INI file.

                      Either you let the user select it or your tool tries to find the INI file itself. For most users it is difficult to find the INI file because taking only the default location for UltraEdit into account, it is stored in a hidden directory so simply navigating to it is already the first problem.

                      If you plan that your tool finds the INI file itself, you have to take UE, UES, UEP, UE3 and UEX into account and their search orders for their INI files. An INI file specified on the command line is more or less not possible to find out by your tool.

                      The environment variables UEINIDIR and UESINIDIR are easy to evaluate.

                      The location in the program directory (my preferred location) requires that you find out the program directory of the application. For UE and UES you can use the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\uedit32.exe respectively uestudio.exe.

                      The locations Windows directory (env: WINDIR or SYSTEMROOT) and application data directory via APPDATA environment variable are also no problem.

                      For UE3, UEP and UEX I can't help because I don't no the default locations.

                      When you evaluate the INI file first look on Use Registry= in [Settings]. If this setting exists and has the value 1, your tool would need to do the further actions in the registry instead of the INI file.
                      Best regards from an UC/UE/UES for Windows user from Austria

                      2362
                      MasterMaster
                      2362

                        Dec 23, 2009#26

                        You make some good points.

                        Since I've never used the Windows registry, I didn't think about the possible need for checking that. Good point. I'll add that to the "to do list" for this little project.

                        I've already thought about how to locate the INI file. You will have to select your "product" from a list (UE, UES, UEx, etc.) I will have a button to allow you to "auto detect" the location. If it's not in one of the expected locations, then it will pop up a box telling you that it is unable to locate it, and ask you to browse for it. If someone moved the INI file to a different location, then they should be an advanced enough user to locate the thing with a browse dialog. If not, then they probably have no business trying to use advanced features of UE, and should stick to notepad. :mrgreen:

                        I'll just have to start a new topic and locate people that use UE3, UEP, etc. and see if they can all give me the search order for the INI file, or see if Tech Support is willing to give me the info to develop this tool. Perhaps, if the tool works well and IDM can see it in action, and if color schemes gain popularity, then IDM may begin to consider making it a part of UE in the future if they don't currently consider it. If my tool becomes obsolete because IDM saw the value of it, then I wouldn't feel the effort was wasted. On the contrary, I would feel that the tool exceeded expectations.

                        If anyone wants to go ahead and give me the "expected" locations of the INI file of UE3 and UEP (I'll assume these won't use the registry), then go ahead and post those locations for me. The program will have to request the installed drive for it. How UE3 and UEP name the ini files would also be helpful.
                        “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                        32
                        Basic UserBasic User
                        32

                          Dec 24, 2009#27

                          Wow there is still some action in this thread.

                          Well I doubt color schemes will pick up in popularity...for that to happen would first require some new ones or at least some ported...I tried to see if could peak folks interest a while back [Linky] but that fell flat.

                          Not looking to rain on anyone's parade, just not wanting anyone putting them selves out to much.

                          Really till we have more schemes I think the macro's & instructions are more than enough... but thats my take on things.

                          Anyways best of luck. :)

                          2362
                          MasterMaster
                          2362

                            Dec 24, 2009#28

                            I'm of the belief that the reason color schemes haven't taken off is because it is a real pain to share. Having to do a macro to get it into the wordfile and then go change the colors for bookmarks, etc. makes it a real pain.

                            I'm hoping that if we can make it easier, then we'll begin to GET some new color schemes to share. It's worth a shot, even if it falls flat.
                            “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                            32
                            Basic UserBasic User
                            32

                              Dec 25, 2009#29

                              Well certainly installing a new color scheme is currently difficult, and your future application would certainly increase people making use of them, bar none.

                              However creating color schemes is currently a pain in the ass, I was at one point thinking of creating a application that would host an IE session of a custom webpage with CSS markup that I could alter and then refresh the page display as I altered colors...course it was also to build a color pallet based off importing VIM or VS color schemes...and others as interest spread. Then export the scheme to UE format...however since there was no takers of my original post to port schemes...I simply let the idea die.

                              Something like that would have cut development time of Tango Dark from 4 hours to 20 minutes or less. Folks are certainly a lot more willing to throw away 20 minutes of their life than 4+ hours.

                              The issue to me seems more two prong...installation going from minutes to seconds...and creation going from hours to minutes. The creation issue being the biggest hurdle to seeing more schemes...installation deals more with the amount of folks actually making use of the schemes that are created.

                              Well I give you mad props for tackling one of the prongs and certainly look forward to the fruits of your labor, as it will certainly benefit the community. :)

                              2362
                              MasterMaster
                              2362

                                Jan 04, 2010#30

                                Nologic,

                                You have certainly made some valid points there. Points I wish to incorporate into the utility.

                                I have decided that, being bad manners to hijack someone else's thread, and being that this utility should be a separate topic than "New Color Scheme (Tango Dark)", I have opened up a new topic.

                                I will continue discussion on my project at Color Scheme Management Tool

                                Nologic, you'll have to take a look over there and see if this might fit the bill on cutting down development time for a new theme. I'm hoping it will. It certainly seems like it would to me.
                                “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                                Read more posts (3 remaining)