Macro file per project?

Macro file per project?

112
Power UserPower User
112

    Aug 26, 2005#1

    I'm just getting into projects in UltraEdit. Naturally, that are cool. 8)

    However, I think they'd be cooler if you could nominate a macro file to load on project load. 8) 8)

    I find I'm doing this a lot. I create specialised macros for each project and it would be neat to have them load as I load the project. I've got about half a dozen projects specified and about four of them have these specialized macros.

    Cheerz,
    Paolo
    There is no such thing as an inconsistently correct system...
    Therefore, aim for consistency; in the expectation of reaching correctness!

    6,603548
    Grand MasterGrand Master
    6,603548

      Aug 27, 2005#2

      Good idea! Have you written this as a feature request to IDM?

      As workaround place all macros of all projects into one macro file and load this macro file automatically. You should name the macros with a project specific pattern, so you know, which macro is for which project.
      Best regards from an UC/UE/UES for Windows user from Austria

      32
      Basic UserBasic User
      32

        Feb 25, 2014#3

        Has this ever been implemented? I would like the option to load a particular macro with a specific project, and it even mentions this capability in the UE Help (in the Project Menu help screen), but it is not in any Project or Macro menu or dialog that I can find, and the mention in the Help file has no link (as though it isn't really there). The existence in the Help file kind of implies that they intend to implement it, but this is such an old thread, I'm wondering why it hasn't been done (assuming it hasn't).

        6,603548
        Grand MasterGrand Master
        6,603548

          Feb 25, 2014#4

          The help page for Project menu contains the entry Set Auto Load Macro as it is indeed possible to configure a macro file with 1 or more macros to be loaded automatically on project load and even run one of the macros 1 or more times if that is also wanted.

          The feature was introduced with UE v16.10 / UES v10.10 according to changes.txt / changes_ues.txt in the program files folder of UE / UES.

          If you can't see Set Auto Load Macro item in menu Project in UltraEdit for Windows or UEStudio, the version of UE / UES you use does not support it, or you use a customized menu, or a standard menu from a previous version never updated after upgrading UE / UES.
          Best regards from an UC/UE/UES for Windows user from Austria

          32
          Basic UserBasic User
          32

            Feb 25, 2014#5

            Hmmm. I have the latest version of UE (21.00.0.1033), and have never customized any menus. But I sure do not see that option in the Project menu.

            Apparently there is something wrong with my installation, but I have not had any other problems anywhere, at least menu-wise. I looked in the Project settings and there is nothing there either.

            The Macro menu has a "Set Auto Load..." option, but that seems to be for when UE itself loads, and not tied to the Project. It also has a "Set Macro for File Load/Save" but that seems to be just for when you Open or Save a file, again not tied to the project.

              Feb 25, 2014#6

              The Macro menu has a "Set Auto Load..." option, but that seems to be for when UE itself loads, and not tied to the Project. It also has a "Set Macro for File Load/Save" but that seems to be just for when you Open or Save a file, again not tied to the project. I cannot understand this problem at all, but thanks for the suggestion. :)

              11327
              MasterMaster
              11327

                Feb 25, 2014#7

                Mofi is right, I have item Set Auto Load Macro... in menu Project too.
                It's impossible to lead us astray for we don't care even to choose the way.

                32
                Basic UserBasic User
                32

                  Feb 25, 2014#8

                  OK, since I seem to be the only person who has the latest version of UE but does not have the menu item in the Project Menu to set a macro, can anyone point me to where the problem would be? If there is some menu lurking from a prior installation (must be LONG ago, it is seeming), how can I restore the installation to the latest?

                  I suppose I could uninstall and reinstall. I am somewhat reluctant - I mean, EVERYTHING else is working, including all the latest features. Is there some way to just reset the Project Menu, or perhaps all the menus? Something short of a full uninstall/reinstall?

                  6,603548
                  Grand MasterGrand Master
                  6,603548

                    Feb 25, 2014#9

                    Open View - Layouts - Manage Layouts. Standard layouts installed with UE v21.00 are only Balanced, Clean, Lean and Multi-Window (on using English UE/UES).

                    All others are from older versions of UltraEdit which can be deleted now if not used, or you created one by yourself in the past, for example on first start after upgrade from UE < v20.00 to v20.00/21.00 as I have done by choosing the option to keep my previous layout resulting in using now My Layout created by UE/UES. All layouts except the 4 standard layouts must be managed by the user itself. There is the button Reset selected layout which of course can be used only on one of the 4 standard layouts, but not on any customized layout.

                    Alternatively the configuration dialog Advanced - Configuration - Toolbars / Menus - Management can be opened. There are two buttons. The button Manage menus opens one more dialog on which a menu can be reset. Here it is possible to reset the main menu profile and the popup menu profile (file context menu and file tab context menu) of the standard layouts as well as a custom layout. All other files of a layout like the toolbar configuration, the layout template file, or the layout workspace file are not reset by using the button Reset in this window in comparison to button Reset selected layout in Manage Layouts dialog which resets all user configuration files for a layout.

                    I suggest to use first Advanced - Configuration - Backup/Restore User Customization and backup all files containing user configuration (= usually all files). Then delete old layouts not used anymore and reset all 4 standard layouts in Manage Layouts dialog. Last reset the menus and perhaps also the toolbars of the layout you currently use. If everything is fine after 4 weeks on using UltraEdit with reset layout, you can delete also the backup of the configuration (and create a new one for current configuration).
                    Best regards from an UC/UE/UES for Windows user from Austria

                    32
                    Basic UserBasic User
                    32

                      Feb 25, 2014#10

                      OK, thanks very much for your detailed info and suggestion, Mofi. I will give it a try and report back (so others might benefit if they have a similar problem)...

                        Feb 25, 2014#11

                        OK, I got it working, including now seeing the "Project>Set Auto Load Macro" item on the menu (active after you have opened a Project). I tried using it and it works. Next time I opened that project, the specific macro I established was in the Macro List. Very nice, and what I was looking for.

                        As far as the Menus and Toolbars, yes, I had "customized" the look I prefer and saved it in the past (using the Layout menu). I had forgotten this. Basically the only customization I did was setting up whether the File View box opens on the left, which Lists will appear on the right side, and which Toolbars appear and where. I did NOT do any menu customization (in fact, I never even thought of it).

                        The wrinkle here, it seems to me, is that it seems that when a new version of UE comes out, what you SEE on menus might not be the latest set of menu items, just because you are continuing to use an earlier layout that you saved earlier. In this case, my Project menu did not have the "Set Auto Load Macro" item on it, presumably because I created my layout before this option was available on the Project menu. I mean, I didn't ever deliberately REMOVE it, it just never appeared when UE acquired it, it seems.

                        In fact, when I tried to do what Mofi suggested, the Layout item was no longer showing on my View menu (although I must have used it at some time to establish my customized layout). So, in other words, it seems to me that if you are using a customized layout, your menus can get REALLY messed up when new versions of UE come out, over time.

                        I used the Advanced>Configuration>Toolbars/Menus>Management to reset my menus. When you do so, it warns you that there is no reset (or maybe it said "default") for it and that it is using "Advanced" for it. That got me all the menu entries, including Project>Set Auto Load Macro, and View Layouts.

                        So, I think it is good advice (as Mofi says) to reset your menus in any layout you are using, when a new version of UE comes out, to keep them up-to-date. Otherwise, old items might disappear and I suppose new ones might not be there. I think, this is pretty confusing sometimes, but I see this as a function of UE's flexibility and customization, so no complaints from me. I just have to learn how to use it better.

                        Just one more thought: I do think it is very odd that this Set Auto Load Macro setting is not in the Project Settings dialog. In fact, after getting everything set up and working, I kind of suspected that the macro I established for the first project I tried with the setting would be applied to ALL macros. I did not want this, but figured that was what I would get. But no, it only loaded on the one project I had active when I used the menu to establish it. So, in other words, it is project specific, as I wanted. But then, shouldn't it really be inside the Project settings (dialog)?? Not a big deal, but it is kind of odd, I think.

                        Thanks Mofi and Ovg!

                        6,603548
                        Grand MasterGrand Master
                        6,603548

                          Feb 27, 2014#12

                          It is understandable for me why the configuration for the project macro file and the macro to run on project load is not integrated into the project settings dialog which differs from UltraEdit to UEStudio.

                          The dialog for Project - Set Auto Load Macro is exactly the same as for Macro - Set Auto Load. Just the data returned by the dialog is stored in *.prj file instead of *.ini file. Therefore it makes sense from a programmer's view to not reinvent what is already coded by putting the elements of the dialog for configuring a macro to load on startup into the project settings dialog and add additional code to the project settings dialog class to support those elements.

                          Well, perhaps it would have made sense to put in the project settings dialog a button to open the dialog for configuring the project macro options. But in my point of view it does not really make a difference if this dialog is opened by a click on a menu item or by a click on a button in the project settings dialog, of course as long as the menu is up-to-date.

                          In UltraEdit all items in menu Project except New Project/Workspace, Open Project/Workspace and the recent project list at bottom are only for the currently loaded project. The 2 Ctags related commands can be used additionally also for the currently active file if no project/workspace is loaded although I suppose that not many users make use of Ctags without using a project.
                          Best regards from an UC/UE/UES for Windows user from Austria