User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

This forum is user-to-user based and not regularly monitored by IDM.
Please see technical support page on how to contact IDM.
10 posts Page 1 of 1
Hello,

how can I open the ~ue.txt generated files in my default web browser?

When I click on the globe (Show file in default browser), only a new tab opens in UE with a temp filename followed by ~ue.txt.

But I like to see it in the default web browser as interpreted HTML code.

Thanks for any hint.

Markus
Currently using: Version 21.20.0.1004 (German Edition). Windows 8.1 x64
UltraEdit creates in directory of active file a temporary file with file name *~ue.ext whereby the file extension is the same as of active file. This means with active file being test.html the temporary file is *~ue.html and with active file being test.html the temporary file is *~ue.htm.

This file is opened now like when you would type in a command prompt window:

start "Open in Default Browser" "Path to temporary file\*~ue.ext"

The command start searches now in Windows registry under HKEY_CLASSES_ROOT if the file with this extension not being listed in environment variable PATHEXT as executable is registered and which application is set as default application for opening files with this extension.

Your active file has for some unknown reason the file extension txt. And it looks like you have associated UltraEdit as being the application to open files with that extension. Browsers associate itself with .htm, .html, .xht, .xhtml, http, ftp, and some others when the user selects an installed browser as default browser. But I have never seen that double clicking on a *.txt file results in file being opened in default browser.

See View in Firefox / Internet Explorer / Opera / Chrome / Safari how to configure a user tool to open active file independent on file extension and without creating a temporary file in the browser you want to use as viewer for active file.
Best regards from Austria
Hello Mofi,

thanks for your help. I handle it as advised, but chrome starts with no page found:

Chrome wrote: Diese Webseite wurde nicht gefunden.

ERR_FILE_NOT_FOUND

The path in the url bar shows only a part of the path where the .txt file is based. Could be a problem with a space is in between the path?
How could I switch back so UE will open the temp file correctly in the default browser?
Could I change some ini file oder registry entry?

Best regards.

Markus
Currently using: Version 21.20.0.1004 (German Edition). Windows 8.1 x64
What do you use now, menu item Show File in Browser or the user tool?

For the user tool you must use quotes if path or file name contain spaces. That is standard on all operating systems.

Command line: "Path to Chrome\chrome.exe" "%f"

Show File in Browser always works in my tests with UE v22.10 independent on spaces in path or name in active file (for HTML files).
Best regards from Austria
Hello Mofi,

I have changed the path and now chrome starts and shows the file, regrettably it isn't a preview, it shows the html code which I wrote in UE. I like to see it formatted in the browser like when I click the preview button inside UE.
If I could copy and paste content out of the UE preview, that would be the best, but this isn't possible. So I have to find a way to open the html code from my .txt file inside a html browser.

May do you have a tip how could I create a new file key in the root registry? So i could assign the *ue.txt file type to a web browser.

cheers

markus
Currently using: Version 21.20.0.1004 (German Edition). Windows 8.1 x64
Browsers display *.txt files as plain text file. With your .txt file opened and active in UltraEdit, click on File - Rename File and change file extension from txt to htm.

Now using the configured user tool or Show File in Browser results in getting content of file interpreted by the browser as HTML code and not displayed anymore as plain text file.
Best regards from Austria
Hello Mofi,

but I need the file as .txt and not as .html
Why isn't it possible to make a copy & paste in the UE preview? UE can preview the html code in a .txt file as formatted site.

cheers
markus
Currently using: Version 21.20.0.1004 (German Edition). Windows 8.1 x64
First, you should read the brief overview chapter of power tip Unicode text and Unicode files in UltraEdit/UEStudio. It is about a world wide agreement about how to interpret the 0's and 1's of a text file.

Another world wide agreement fulfilled by all browsers is that a .txt file is a plain text file and is therefore displayed as plain text independent on what this text file contains. You break this world wide agreement by putting into a .txt file HTML code and expect that the browsers interpret the text file with the HTML interpreting engine. But as you now know, they don't do that.

Now we come to another not explicitly expressed agreement: Show File in Browser should be used for HTML files only by the user. Please read in your German UltraEdit help the page about Show File in Browser command or read online the English help for this command. Let us look together on last paragraph:

UE help wrote: This function uses the Shell Extensions and the default application associated with the extension will be used to show the file. If the extension is not associated with the browser the file will not be shown in the browser.

What does this mean in detail?

It means that Show File in Browser is in real: open a temporary created file according to its file extension by the application associated with according to Windows registry.

So if the active file is for example a CSV file with file extension .csv and for example Microsoft Excel is associated with .csv as opening application, using Show File in Browser results in creating a temporary *.csv file by UltraEdit and opening it with MS Excel. Or if the active file is a *.vbs file, usage of Show File in Browser results in getting the temporary file interpreted by the windows scripting host associated by default as opening application for .vbs files. And if the file is a Perl script with file extension .pl and this file extension is associated with installed Perl interpreter, the temporary file created by Show File in Browser is interpreted by the Perl interpreter.

That are the agreements which you break all by putting HTML code into a .txt file and expecting that either the browsers interpret the .txt file like a .html file or that UltraEdit renames for you the file extension .txt to .htm to get the text file with HTML code displayed interpreted by your preferred browser.

As you can for unknown reason not rename the .txt file temporarily to .htm or .html, you have only two choices:

  1. You create a user tool which calls a batch file with full name of active file as parameter. The batch file evaluates the file extension. If file extension is .txt, a copy of the file in same directory is made with file extension .htm. Then the default browser is started with either original file name or with file name of created copy with right file extension for the browser. This would be easy to code. A little bit more difficult to code in batch file would be the deletion of temporary file created by the batch file for the .txt file. A simple solution would be waiting 5 to 10 seconds and then delete the created copy with file extension .htm as after 5 to 10 seconds the browser should have been started and interpreted the file already.

  2. You use the Toggle Browser View feature of UltraEdit as explained in power tip HTML preview to get the HTML code in .txt file displayed within UltraEdit interpreted by Internet Explorer passed by UltraEdit via a special interface offered by Microsoft directly to the HTML interpreting engine of IE (direct DLL function call). The disadvantage of this method is that images referenced with a relative path to file containing HTML code are not displayed nor are loaded other files like *.js or *.css referenced with a relative path as the HTML interpreting engine interprets directly the HTML code passed by UE to the engine via the interface and therefore the engine does not know path and name of file containing the interpreted HTML code.
Solution 2 is what you have tried already, but does not help on your task to copy to clipboard the displayed text after interpreting the HTML code in the text file. UltraEdit supports selecting the displayed text, but not copying the selected text for unknown reasons.
Best regards from Austria
Hello Mofi,

thanks for your explanation. Anyway, it seems that I have to do some work a round to be able to copy and paste a formatted html code.
Maybe in a future version, UE will offer a context menu in the preview window to do that.

Cheers

markus
Currently using: Version 21.20.0.1004 (German Edition). Windows 8.1 x64
gieri wrote: Maybe in a future version, UE will offer a context menu in the preview window to do that.

Yes, that would be definitely helpful for you and perhaps also other users who want to get copied into clipboard the displayed text of an HTML code stored in any text file. It most likely depends on how many users request a copy text from browser view feature by email sent to IDM support if such a feature will be ever available and how long it will take to get it in a future version of UltraEdit.
Best regards from Austria
10 posts Page 1 of 1