Quick open a file in running instance of UE with Total Commander

Quick open a file in running instance of UE with Total Commander

20
Basic UserBasic User
20

    Jan 07, 2012#1

    This is a small tool I wrote to speed up file loading if you use Total Commander and UltraEdit together.
    1. Download ueFastStart.zip and decompress to folder of your choice.
    2. Open Total Commander, select Configuration, Options - Edit/View - Editor for F4 and locate ueFastStart.exe ... OK
    From now on, select the file within TC and press F4 to quickly open the file in UE.

    Support for loading multiple files at once was added with version released on 2012-06-06.

    Until now, you had to use the mouse to drag and drop the selected files to UltraEdit window, which required mouse operations and extra wait time for UE window to pop up.
    (or you can use other tools, but you don't get any speed gain as you do with ueFastStart)

    To load multiple files faster, do the following:
    1. Open TC, select Start, Change Start Menu.
    2. Click on Add Item and type ueFastStart, click OK.
    3. Below, in the Command section, locate the file ueFastStart.exe.
    4. In the Parameters, type @%L
    5. leave the Shortcut key to [none] (read below on how to get a wider choice of hot keys)
    6. Click OK.
    From now on, select the files you wish to edit, then select Start, ueFastStart.
    Better yet, you should assign a hot-key to the created start menu item, as follows:
    1. In TC, go to Configuration, Options, Misc
    2. In the Redefine hotkeys section, choose a hotkey.
    3. Use the loupe to find the correct command (look in Category: User).
    4. Right next to the loupe is a check-mark - click it so TC accepts the new key shortcut.
    Notes:
    1. Both Configuration, Options - Edit/View - Editor for F4 and Start Menu Item - should point to the same EXE file.
    2. There will be no speed gain if UE is not already running.
    3. The tool only starts the file loading process sooner, the actual file loading speed is not affected.
    4. The tool doesn't use registry, can be simply erased.
    Support for UltraEdit prior v14.00 with UltraEdit-32 in window title was added with version released on 2012-06-08.
    Version 2012-06-10 improved UE window detection. (particularly if you have a project/workspace loaded in UE)

    uesFastStart is a tool for opening a single file fast in UEStudio.
    ueFastStart.zip (1.64 KiB)   601
    New version for UE published on 2012-06-10. Previous versions were downloaded 85 times in total.
    uesFastStart.zip (1.19 KiB)   551
    Tool for UEStudio

    6,688586
    Grand MasterGrand Master
    6,688586

      Jan 08, 2012#2

      Congratulations, really a great tool.

      I use at the moment Total Commander v7.56a on both of my computers with Windows XP SP3 x86 and Windows 98 SE and configured your tool as editor in TC. It works great for UltraEdit v17.30.0.1014 as also for UE v11.20b (WinXP), as well as for UE v11.20a and UE v14.00b+1 (Win98).

      Many thanks for this tool.

      Just one more information for TC and UE users:

      If multiple instances of UltraEdit are currently running, the file under cursor on pressing key F4 in Total Commander is opened with this tool in last used UltraEdit instance according to global window history list.

      You should publish this tool also on TC Utilities of TOTALCMD.NET and send it to IDM support by email hosting them on their server. I would not be surprised if IDM rewards your work on this tool with a free upgrade or even a lifetime license for UltraEdit or any other IDM application.

      1581
      Power UserPower User
      1581

        Jan 11, 2012#3

        Works fine for me - thank you.

        Peter

        2362
        MasterMaster
        2362

          Mar 13, 2012#4

          I'd like to suggest not leaving out UEStudio users, like myself. A tool for UEStudio would be fine as well.

          Since I don't actually use Total Commander, my needs for a tool like this is a bit different than for other people, in that I am not worried about passing multiple files to an already running instance of UE. Plus, I use UEStudio and only keep UE around for testing purposes when I create utilities for UE/UES.

          I wrote a quick and dirty little helper using AutoHotKey (while compiles to being larger than and runs slower than a C or C++ program, but was very quick and easy to implement and compile.) This script basically checks to see if a filename was passed, and, if so, passes it to UES by "running" UES with the filename on the command line. This gives me the option to add command line parameters to UES so that this can be called from Explorer using my utility as the association instead of UES, but I don't plan to personally use it in that manner.

          If a filename is not passed to this script, then it checks to see if an instance of UES is already running. If it is, it brings that window into focus. If not, it launches UES. Very simple, very quick and dirty, but works well for me. Since my keyboard has a row of keys at the top that allow me to "assign" a program to them, I have compiled the script and assigned it to a shortcut key, so that instead of having to "alt-tab" to go to an open UES, I just press that button. If you replace UEStudio in the script with UltraEdit, then it would work the same for UltraEdit as well. You'll need AutoHotKey to be able to make the changes and recompile the script. (I wrote it with AutoHotKey_L, not basic).

          Code: Select all

          SetTitleMatchMode, 2
          If 0 > 0
             Run, "UEStudio.exe" "%1%"
          Else
          {
             IfWinExist, - UEStudio
             {
                WinActivate, - UEStudio
             }
             Else
             {
                IfWinExist, UEStudio '11 -
                {
                   WinActivate, UEStudio '11 -
                }
                Else
                {
                   Run, "UEStudio.exe"
                }
             }
          }
          Return

          6,688586
          Grand MasterGrand Master
          6,688586

            Mar 13, 2012#5

            It is right that window of UltraEdit contains just UltraEdit if no file is open as well as window of Windows Explorer if directory UltraEdit is currently viewed making it very difficult to detect which is the right window to send the message for opening the file.

            For Windows Explorer the setting Display the full path in the title bar could be set in the Folder Options on tab View (Windows XP). But that is not the default.

            However, I have no problem with Windows Explorer because it is never opened. I use always Total Commander. TC is my desktop (and Windows desktop is completely empty and just a black area).

            Many thanks for the new version of ueFastStart.exe. Works very fine now for me even with having in my browser an UltraEdit webpage opened with UltraEdit in title. The scan for UltraEdit - on the beginning of the window title as well as - UltraEdit on end of the window title excludes now other application windows like a browser window with UltraEdit anywhere in window title.

            20
            Basic UserBasic User
            20

              Mar 13, 2012#6

              As for the UEStudio, I could write it if UEStudio:

              1. has a reg key similar to UE
              SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Uedit32.exe

              2. main window must be easily recognized, starting-ending with UEStudio.. just like UE.

              2362
              MasterMaster
              2362

                Mar 13, 2012#7

                1. The reg key on my setup is:

                Code: Select all

                SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\UEStudio.exe
                2. Not quite as easily as UE. It can end with "- UEStudio '11", or begin with "UEStudio '11 -"

                Since I want mine to be compatible with future versions, and since I always use the "- UEStudio '11" in my setup, I was able to search for "- UEStudio" within the title and it works fine for me. But I don't have to specify the full ending when I do that. Using AutoHotKey greatly simplified it for me, but it won't be as quick as what most people will want.

                20
                Basic UserBasic User
                20

                  Mar 14, 2012#8

                  Thats not what I see here UEStudio IDE text editor feature map

                  You must also test if UEStudio supports mouse drag and drop the same way as UE does.

                  2362
                  MasterMaster
                  2362

                    Mar 14, 2012#9

                    I am using the latest build of UEStudio. It shows "UEStudio '11" in the title bar. I'm not sure what build they are using, but I do wish they would remove the '11 from it. It takes up, in my opinion, valuable space.

                    I have just discovered something else. If you make UEStudio begin with UEStudio (mine is normally configured to show it last, with file name first), then the "Project name" when you have an open project is first with UEStudio in the middle, and the file name last. Strange behavior to me.

                    Best to do a regex search for UEStudio where it can have a " - " either before, after, or not at all. However, all files closed on my copy still leaves it at "UEStudio '11", which means you can't do it by "UEStudio\0", although some builds that may be the case. Perhaps a search that would allow "UEStudio\0", "UEStudio '11\0", "UEStudio '12\0", etc. in the mix might be the way to go. As of now, my script will break without the '11 in place if the file name is last in the title. So mine is not an ideal solution, as it is customized to only the way I will use it, and I don't bend it to allow others to use it I'm afraid.

                    Since you don't actually need it, and my script works fine for me, then whether or not you continue to create it just depends upon your free time to contribute to the community for those who do use UEStudio. I'm sure there will be those in the community to appreciate the effort.

                    20
                    Basic UserBasic User
                    20

                      Mar 14, 2012#10

                      Here, I wrote uesFastStart for UEStudio attached to first post, but I can't check if it works.

                      I've also attached to first post new ueFastStart. There was a bug.
                      If you started ueFastStart without parameter, and if UE is not already running - nothing would happen.

                      2362
                      MasterMaster
                      2362

                        Mar 14, 2012#11

                        Works fine with UEStudio. Thanks. Smaller than what I made with AutoHotKey, and faster. I suppose I'll have to switch now. :)

                        The only real issue I see is the same one I had noticed originally in the uefaststart, and that is if you have an explorer window (or path in Free Commander/Total Commander) open to the UltraEdit or UEStudio directory, then it may open that instead of the editor. Just need to confirm it's not one of those first.

                        It seems to have the same limitation as the one I had done, only opens one file, as opposed to being able to open multiple files dragged and dropped on top of it. Of course, I have a good wide screen plus multiple monitors, so my UEStudio is always visible for simple drag and drop operations anyway, which means I don't really utilize that feature anyway. Also, as Total Commander will only send one item when pressing F4 then it isn't necessary for this particular tool.

                        Awesome tool. Much faster opening a file this way, since it doesn't try to "run" UE or UES, which slows things down a bit.

                        Thanks for the work on this. I don't suppose you'd be interested in sharing the source with the community?

                        6,688586
                        Grand MasterGrand Master
                        6,688586

                          Jun 06, 2012#12

                          Fantastic!

                          The enhancement for opening all selected files in TC in running instance of UltraEdit (or automatically started UE) via your tool in start menu of TC works great.

                          I have used up to now a toolbar command starting UltraEdit with /f%L specified for Parameters. I keep this command as I have checked in UltraEdit Allow multiple instances and therefore this toolbar command results in opening a list of files always in a new instance of UltraEdit.

                          But with ueFastStart.exe added to start menu of Total Commander and shortcut key CTRL+ALT+F4 assigned to it (option run minimized doesn't need to be checked), I can now very quickly open a list of files in already running instance of UltraEdit too. And of course your tool still starts UltraEdit if no instance of UE is running. Great!

                          Shift+F4 is most likely a not good shortcut key as already predefined by TC for starting the editor with a new named file with name entered in TC. Also I don't know how to specify a shortcut key not present in the drop down list in start menu configuration dialog of TC.

                          May I suggest another small enhancement.

                          Currently ueFastStart.exe supports only UltraEdit v14.00 and later. The reason is that in previous versions of UltraEdit the window title is either UltraEdit-32 if no file is opened in UltraEdit < v14.00 or the window title starts with UltraEdit-32 - and the name of the active file if at least 1 file is opened in UE < v14.00. For compatibility of ueFastStart.exe with such an older version of UltraEdit these 2 additional checks must be added on evaluation of the window titles. - UltraEdit-32 at end of window title is not possible as UE < 17.00 do not have the option to start the window title with file name instead of application name. Therefore ueFastStart.exe must not compare end of window title with - UltraEdit-32.

                          Once again, thanks for that great tool.

                          20
                          Basic UserBasic User
                          20

                            Jun 08, 2012#13

                            OK, attached to initial post is the new version that checks also for "UltraEdit-32" in the beginning of the title.
                            I don't have an older version of UE, so I have not tested it.

                            6,688586
                            Grand MasterGrand Master
                            6,688586

                              Jun 08, 2012#14

                              Many thanks once more in the name of users of TC and older versions of UE. ueFastStart.exe released on 2012-06-08 works now fine also with older versions of UltraEdit and of course still works with current version 18.10. I have tested your tool in 6 possible scenarios with UE v18.10 and v11.20b.

                              I have summarized also all information about the enhancements you made and the information you posted in your initial post and attached the ZIP file with latest version also to your initial post. I think, it is better for visitors interested in the tool to get all information and the latest version in first post and do not need to read all posts of the topic.

                              20
                              Basic UserBasic User
                              20

                                Jun 08, 2012#15

                                I didn't know I could edit posts that were created a long time ago... (I did edit the first post, just now)

                                BTW, I'm curious, what are the 6 scenarios?

                                Read more posts (9 remaining)