[TC 11.50 ß5] %$CLIPBOARD% line breaks

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

[TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *KozakMak »

So I go to https://www.ghisler.com/1150_beta.htm and using Snap Links Plus quickly copied the links I needed:

Code: Select all

https://www.totalcommander.ch/beta/tc1150x32_b5.exe
https://www.totalcommander.ch/beta/tc1150x64_b5.exe
https://www.totalcommander.ch/beta/tc1150x32_64_b5.exe
Now, using HTTP_Downloader.exe --url %$CLIPBOARD% I'm trying to download them. And it all becomes:

Code: Select all

https://www.totalcommander.ch/beta/tc1150x32_b5.exehttps://www.totalcommander.ch/beta/tc1150x64_b5.exehttps://www.totalcommander.ch/beta/tc1150x32_64_b5.exe
Moreover, if you paste these links into a notepad, then line breaks are preserved :shock:
OS: Win10 | TC: latest x64
hi5
Power Member
Power Member
Posts: 641
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *hi5 »

Have you tried %$CLIPBOARD0% (Same as %$CLIPBOARD%, but replaces line breaks with spaces) ?
Command line options usually can't be multiline but I know nothing about your http download app so could be wrong.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *ghisler(Author) »

Indeed %$CLIPBOARD0% should be used here, it replaces line breaks with spaces. %$CLIPBOARD% inserts the clipboard data unmodified.
Author of Total Commander
https://www.ghisler.com
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *KozakMak »

hi5 wrote: 2024-11-06, 17:39 UTC Command line options usually can't be multiline but I know nothing about your http download app so could be wrong.
https://github.com/erickutcher/httpdownloader/releases

If I use this - all ok

Code: Select all

https://www.totalcommander.ch/beta/tc1150x32_b5.exe
https://www.totalcommander.ch/beta/tc1150x64_b5.exe
https://www.totalcommander.ch/beta/tc1150x32_64_b5.exe
ghisler(Author) wrote: 2024-11-06, 17:51 UTC Indeed %$CLIPBOARD0% should be used here, it replaces line breaks with spaces.
httpdownloader just insert first link
ghisler(Author) wrote: 2024-11-06, 17:51 UTC %$CLIPBOARD% inserts the clipboard data unmodified.
but its modified !

Ctrl+V in notepad looks like:

Code: Select all

https://www.totalcommander.ch/beta/tc1150x32_b5.exe
https://www.totalcommander.ch/beta/tc1150x64_b5.exe
https://www.totalcommander.ch/beta/tc1150x32_64_b5.exe
but HTTP_Downloader.exe --url %$CLIPBOARD% looks like: https://ibb.co/j3ZQdy1
OS: Win10 | TC: latest x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *ghisler(Author) »

No, it's not modified! When you try to step through the characters between two paths, you will see that there are two hidden unprintable characters, which are carriage return (13) and line break (10).
Author of Total Commander
https://www.ghisler.com
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *KozakMak »

so its httpdownloader issue?
OS: Win10 | TC: latest x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *ghisler(Author) »

It's just a display issue, it probably uses a listbox to show the entries.
Author of Total Commander
https://www.ghisler.com
browny
Senior Member
Senior Member
Posts: 370
Joined: 2007-09-10, 13:19 UTC

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *browny »

--url - A URL to download.
Maybe it expects a single URL, and never a list?
Probably most command line parsers do not expect multiline inputs.
Bohny
Junior Member
Junior Member
Posts: 5
Joined: 2023-08-04, 00:24 UTC

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *Bohny »

My Test:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\extraLib\HTTP_DL_64\HTTP_Downloader.exe --url %$CLIPBOARD%

%COMMANDER_PATH%\extraLib\HTTP_DL_64\HTTP_Downloader.exe
HTTP_Downloader


-1
Can be pasted into HTTP_Downloader normally :https://ibb.co/6YZmvcK
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *ghisler(Author) »

Apparently this program only accepts a single URL as parameter. Therefore use this instead:
TOTALCMD#BAR#DATA
%COMMANDER_PATH%\extraLib\HTTP_DL_64\HTTP_Downloader.exe --url %$CLIPBOARD1%

%COMMANDER_PATH%\extraLib\HTTP_DL_64\HTTP_Downloader.exe
HTTP_Downloader


-1
This will only pass the first URL to the program.
Author of Total Commander
https://www.ghisler.com
Ziabrev
Junior Member
Junior Member
Posts: 45
Joined: 2022-05-12, 18:03 UTC

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *Ziabrev »

26.04.23 Added: Command line parameters (button bar, start menu): New parameter %|envvar| inserts environment variable envvar, e.g. %|windir| or %|$DESKTOP| in the parameter field (32/64)

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\HTTP_Downloader\HTTP_Downloader.exe
 --immediate  --url %|$CLIPBOARD|%
%COMMANDER_PATH%\HTTP_Downloader\HTTP_Downloader.exe
Downloader - CLIPBOARD
%COMMANDER_PATH%\HTTP_Downloader\
-1

screen
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *ghisler(Author) »

Moderator message from: ghisler(Author) » 2024-11-12, 15:52 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
KozakMak
Senior Member
Senior Member
Posts: 498
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: [TC 11.50 ß5] %$CLIPBOARD% line breaks

Post by *KozakMak »

UPD: with Snap Links 3.1.14 all OK !
OS: Win10 | TC: latest x64
Post Reply