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

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

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

Postby Mofi » Sat Jun 09, 2012 10:03 am

Well, there are in real 11 scenarios for opening 1 or more files in UltraEdit via ueFastStart as I have found out yet after reading all posts in this topic again including the one posted by rhapdog about effect of an opened project/workspace on window title:

  1. UltraEdit is not running.

  2. UE prior v14.00 is running with no file opened in UE, and also no project/workspace loaded.

    A window exists with title "UltraEdit-32".

  3. UE prior v14.00 is running with no file opened in UE, but a project/workspace is loaded.

    A window exists starting with "UltraEdit-32 -" in title.

    The entire window title is "UltraEdit-32 - project name"

  4. UE prior v14.00 is running with at least 1 file opened in UE, but no project/workspace loaded.

    A window exists starting with "UltraEdit-32 -" in title.

    The entire window title is "UltraEdit-32 - [file name with or without path]"

  5. UE prior v14.00 is running with at least 1 file opened in UE, and a project/workspace is also loaded.

    A window exists starting with "UltraEdit-32 -" in title.

    The entire window title is "UltraEdit-32 - project name - [file name with or without path]"

  6. UE v14.00 or later is running with no file opened in UE, and also no project/workspace loaded.

    A window exists with title "UltraEdit".

  7. UE v14.00 or later is running with no file opened in UE, but a project/workspace is loaded.

    A window exists ending with "- UltraEdit" in title.

    The entire window title is "project name - UltraEdit"

    Interesting here is that configuration setting Start application title with file name has in this case no effect on window title. The application name is always at end of the window title after the project name.

  8. UE v14.00 or later is running with at least 1 file opened in UE, but no project/workspace loaded, and configuration setting Start application title with file name is not enabled, or the setting does not exist at all.

    A window exists starting with "UltraEdit -" in title.

    The entire window title is "UltraEdit - [file name with or without path]"

  9. UE v17.00 or later is running with at least 1 file opened in UE, but no project/workspace loaded, and configuration setting Start application title with file name is enabled.

    A window exists ending with "- UltraEdit" in title.

    The entire window title is "[file name with or without path] - UltraEdit"

  10. UE v17.00 or later is running with at least 1 file opened in UE, and a project/workspace is also loaded, and configuration setting Start application title with file name is enabled too.

    A window exists ending with "- UltraEdit" in title.

    The entire window title is "[file name with or without path] - project name - UltraEdit"

  11. UE v14.00 or later is running with at least 1 file opened in UE, and a project/workspace is also loaded, and configuration setting Start application title with file name is not enabled, or the setting does not exist at all.

    A window exists containing in the middle of the title "- UltraEdit -".

    The entire window title is "project name - UltraEdit - [file name with or without path]"

The default program files directory name for UE < v14.00 was also UltraEdit-32.

ueFastStart released on 2012-06-08 works for all scenarios except the last one.

Taking all 11 cases into account and avoiding false positive window detections (window of Windows Explorer or browser window containing also UltraEdit in title) as much as possible, I think the best would be that ueFastStart does following on every window title:

  1. Does the title of a window contain anywhere inside the case sensitive string "UltraEdit"?
    No, this window is definitely not an UltraEdit window and ueFastStart can continue with title of next window.
  2. Has the window title a length of exactly 9 characters?
    Yes, the window is an UltraEdit window - scenario 6.
  3. Does the window title start with case sensitive string "UltraEdit - "?
    Yes, the window is an UltraEdit window - scenario 8.
  4. Does the window title end with case sensitive string " - UltraEdit"?
    Yes, the window is an UltraEdit window - scenario 7, 9 and 10.
  5. Does the window title contain case sensitive string " - UltraEdit - "?
    Yes, the window is an UltraEdit window - scenario 11.
  6. Is the complete window title equal case sensitive string "UltraEdit-32"?
    Yes, the window is an UltraEdit window - scenario 2.
  7. Does the window title start with case sensitive string "UltraEdit-32 - "?
    Yes, the window is an UltraEdit window - scenario 3, 4 and 5.
Note: The leading or trailing space(s) in the double quoted strings in the list above are not mistakes. It would be good to include them on string comparison to avoid false positive window detections as much as possible. Well, for the fourth test the string could be even "UltraEdit - [" and for the fifth test the string could be even " - UltraEdit - [" to exclude even more non UltraEdit window titles.

I think, you have combined test six and seven by comparing start of window title with just "UltraEdit-32". This is also okay and makes the tool a little bit faster. I think, in 99.999999% of all window titles it is okay to compare start of window title for compatibility with UE < v14.00 with just "UltraEdit-32" as IDM most likely has no webpage anymore with a title beginning with "UltraEdit-32".
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

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

Postby aleksazr » Sun Jun 10, 2012 3:27 am

I've added 5, changed 6-7 (the rest I had already) and attached the new version to the first post.
aleksazr
Basic User
Basic User
 
Posts: 20
Joined: Sun Dec 18, 2011 7:16 pm

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

Postby Mofi » Sun Jun 10, 2012 11:04 am

PERFECT!

ueFastStart.exe works now perfect in all 11 scenarios and ignories the browser window starting with UltraEdit hotfix information in title.

Once more, many thanks for this great tool and all the added enhancements. Opening 1 or more files in UltraEdit from Total Commander is now easy and ultrafast.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

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

Postby Peter » Mon Mar 11, 2013 8:22 am

Moving my system to the current state-of-art I come back to this thread and would like to know if this tool found a more prominent space for downloading? Is it linked / integrated somewhere on an "UE Tool page" or something else?

Peter
User avatar
Peter
Basic User
Basic User
 
Posts: 33
Joined: Mon Nov 01, 2004 12:00 am
Location: Switzerland

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

Postby aleksazr » Mon Mar 11, 2013 9:00 am

I myself haven't uploaded it anywhere else but here, and I think it is available only from this thread.
aleksazr
Basic User
Basic User
 
Posts: 20
Joined: Sun Dec 18, 2011 7:16 pm

Previous

Return to Custom User Tools/Tool Configuration