Tapatalk

User tool to launch browser does not work with some urls (solved)

User tool to launch browser does not work with some urls (solved)

12
Basic UserBasic User
12

    Nov 18, 2016#1

    I configured a user tool that will
    1. launch the selected URL in the default browser (Chrome in my case), or
    2. open the selected fully qualified path/filename in the default program
    as if the filename was double clicked in Windows Explorer.

    UE-tool-configuration-command.JPG (38.38KiB)


    UE-tool-configuration-options.JPG (33.03KiB)


    UE-tool-configuration-output.JPG (39.35KiB)


    Sometimes, the URL does not launch in the browser but instead opens Windows Explorer. Here are some examples:

    THIS WORKS
    http://answers.microsoft.com

    THESE DO NOT WORK
    http://answers.microsoft.com/message/cd1a5a77-5904-45b5-a26a-f3116f9dc1f3?threadId=4c1fbf13-ea94-4fbe-8528-c51a80908bb5
    http://forums.androidcentral.com/?utm_medium=navbar&utm_campaign=navigation&utm_source=ac

    ALL WORK when I copy and paste them into Chrome.

    Frankly, this is question probably belongs in a Windows forum, but I'm hoping someone here might have tried this sort of thing and got it to work on URLs like these.

    Any ideas?

    TIA,
    Phil

    6,688587
    Grand MasterGrand Master
    6,688587

      Nov 18, 2016#2

      Well, you always start Windows Explorer which is the first mistake. The most important mistake is passing the selected URL without enclosing it in double quotes. Special characters like ? and & are not interpreted as simple literal characters in parameter string when the parameter string is not enclosed in double quotes.

      Use as command line in the user tool configuration: start "Open file or url" "%sel%"

      The command start is executed by UltraEdit instead of Windows explorer as this internal command of Windows command interpreter finds out automatically which application to use for opening a file or an URL according to Windows file association. So this user tool could be with that command line also used to open for example a *.docx file whose file name with path is selected in UltraEdit.

      "Open file or url" is the title for the a console window opened by start if the application to run is a console application. start interprets the first double quoted string as console window title string and therefore it is necessary to explicit specify a title string as the selected file name or url in double quotes should not be interpreted as window title string.

      And finally "%sel%" is the selected text (single line only) enclosed in double quotes to interpret all characters in parameter string as literal characters.

      On Options select Windows program. start is an internal command of Windows command interpreter cmd.exe and therefore is used from within a command process, but it is nevertheless useless for this tool to open a console window and wait for it to terminate as start starts here a new process (Chrome) and immediately terminates itself after doing that. Save active file is also not really needed for this user tool.

      A hint for the future: The image format PNG is much better for screenshots not capturing a displayed photo, i.e. capturing a graphic display than JPEG. Every application supporting JPEG supports also PNG. PNG uses a lossless compression which means does not add pixel noise like JPEG and usually produces for screenshots smaller files than JPEG.
      Best regards from an UC/UE/UES for Windows user from Austria

      12
      Basic UserBasic User
      12

        Nov 22, 2016#3

        Mofi,

        In parallel to your reply, I figured out the "%sel%" syntax and it seems to work with URLs that contain the "forbidden" characters. I've tried the explorer.exe on several types of files. For example "C:\Users\Owner\AppData\Roaming\Microsoft\Excel\XLSTART\testPersonal.xlsm" works fine. The console window comes and goes so fast that usually I don't even notice it.

        I have a hunch it will work on any file type that supports OPEN in a windows explorer context menu. But I'll do some testing to try to find out and report back here what I find.

        I love the user tool capability in UE. It reminds me how I felt many years ago when I started using UE and realized how much work had gone into its development, even way back then (I think it was 2009/2010.)

        I appreciate your help. Not sure why I didn't get email notification. Maybe something I need to fix in my profile.

        Edit: I fixed the notification default in my profile to YES.

        Regards,
        Phil