paste a picture in total commander

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Ahu_Lee,
What language is used in the above code. For example this "clipboard saveimage", where does it come from? Where can a simple user like me read more about expressions like that?
NirCmd - Windows command line tool
NirCmd Command Reference

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Ahu_Lee wrote:1) What do the dots do in this line below, what's their pupose?.

Code: Select all

%COMMANDER_PATH%\..\SYS\NirLauncher\NirSoft\nircmd.exe clipboard saveimage 
I'm using a portable TC installation together with other portable installed programs referring there location with relative addressing relative to %CommanderPath% (home path of TC).
.. does simply mean : one folder up.
c:\Tools\Totalcmd <- TC's home path
c:\Tools\Sys\NirLauncher\NirSoft<- Nircmd's path
Benefits:
I can move/rename/copy the complete Tools directory e.g. onto an USB stick or any other drive and use TC and all Tools linked via buttons from TC without adapting the paths.
2) NirCmd program saves .png as 32bit. What parameters (or arguments.. whatever they are called) should I use to have it saved as 24bit. There's no real reason for that, but I think I'd just prefer it be more like MS Paint.
32Bit PNG does have an alpha channel(transparency).
Also this is not necessary for screen shot images, it is the better format for other clipboard images and does not make a big difference in size (less than 1% more bytes).
Just tested with MS Paint (was it really the first time i used this limited picture program since decades? :shock:). Seems that Paint does not support transparency:

Code: Select all

---------------------------
Paint
---------------------------
Any transparency will be lost if you save this picture. Do you want to continue?
---------------------------
OK   Cancel   
---------------------------
I would recommend you to use a better program than MS Paint.
E.g. Paint.Net
3) What language is used in the above code. For example this "clipboard saveimage", where does it come from? Where can a simple user like me read more about expressions like that?
Commandline parameter for nircmd
Complete list of all available parameter:
http://nircmd.nirsoft.net/

Regards
Holger
Make our planet great again
Ahu_Lee
Junior Member
Junior Member
Posts: 37
Joined: 2016-08-09, 19:34 UTC
Location: Russia

Post by *Ahu_Lee »

Hacker wrote:Ahu_Lee,
What language is used in the above code. For example this "clipboard saveimage", where does it come from? Where can a simple user like me read more about expressions like that?
NirCmd - Windows command line tool
NirCmd Command Reference

HTH
Roman
Thank you for these links. The first page you gave me the link to was the reason I asked. It only shows examples without actually explaining commands and there was nothing on "clipboard saveimage". The second one I somehow missed and is exactly what I need. Thank you once more.
Ahu_Lee
Junior Member
Junior Member
Posts: 37
Joined: 2016-08-09, 19:34 UTC
Location: Russia

Post by *Ahu_Lee »

HolgerK wrote: I'm using a portable TC installation together with other portable installed programs referring there location with relative addressing relative to %CommanderPath% (home path of TC).
.. does simply mean : one folder up.
c:\Tools\Totalcmd <- TC's home path
c:\Tools\Sys\NirLauncher\NirSoft<- Nircmd's path
Benefits:
I can move/rename/copy the complete Tools directory e.g. onto an USB stick or any other drive and use TC and all Tools linked via buttons from TC without adapting the paths.
I understand your reasoning behind all of that, but I still don't understand the implementation part.

You said you were using the other portable installed programs referring their location with relative addressing relative to %CommanderPath% (home path of TC). But I don't see how the Sys folder in c:\Tools\Sys\NirLauncher\NirSoft relates to your Totalcmd (%CommanderPath%) folder in c:\Tools\Totalcmd.

So, this

Code: Select all

%COMMANDER_PATH%\..\SYS\NirLauncher\NirSoft\nircmd.exe clipboard saveimage
doesn't make sense to me, because I basically interpret it as follows: the SYS folder is a subfolder of some other subfolder (that can have any name) of the folder Totalcmd, while in fact your SYS folder is not even within your Totalcmd folder but has a completely independent path.

This seems to be quite an important concept to understand and I'd like to be sure I understand it right. So, could you please elaborate on this a little more to clear some of the confusions I have?
32Bit PNG does have an alpha channel(transparency), it is the better format for other clipboard images and does not make a big difference in size (less than 1% more bytes).
Thank you for this explanation. Yes, Paint.Net looks awesome and its interface is very smart. Though It's a little bit slower.
Complete list of all available parameter:
http://nircmd.nirsoft.net/
Thank you.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Ahu_Lee wrote:So, this

Code: Select all

%COMMANDER_PATH%\..\SYS\NirLauncher\NirSoft\nircmd.exe clipboard saveimage
doesn't make sense to me, because I basically interpret it as follows: the SYS folder is a subfolder of some other subfolder (that can have any name) of the folder Totalcmd, while in fact your SYS folder is not even within your Totalcmd folder but has a completely independent path.
Nope. Replace %COMMANDER_PATH% with Holger's path C:\Tools\Totalcmd and you'll see that it's alright. To elaborate it a little bit more, here's what the path tells TC to do: %COMMANDER_PATH% is C:\Tools\Totalcmd, from there go one level up (that's the \..\ part), so we are in C:\Tools now. Next go to SYS\NirLauncher\NirSoft subdirectory and execute nircmd.exe. Hope it's understandable now :).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ahu_Lee
Junior Member
Junior Member
Posts: 37
Joined: 2016-08-09, 19:34 UTC
Location: Russia

Post by *Ahu_Lee »

Dalai wrote:Nope. Replace %COMMANDER_PATH% with Holger's path C:\Tools\Totalcmd and you'll see that it's alright. To elaborate it a little bit more, here's what the path tells TC to do: %COMMANDER_PATH% is C:\Tools\Totalcmd, from there go one level up (that's the \..\ part), so we are in C:\Tools now. Next go to SYS\NirLauncher\NirSoft subdirectory and execute nircmd.exe. Hope it's understandable now :).

Regards
Dalai
I really appreciate your help, Dalai. It all makes perfect sense to me now. Thank you very much.
Ahu_Lee
Junior Member
Junior Member
Posts: 37
Joined: 2016-08-09, 19:34 UTC
Location: Russia

Post by *Ahu_Lee »

I've noticed that when you save PNG using NirCmd the file wouldn't visually appear in TC until it was refreshed (until it reread the source). I understand that most likely it has nothing to do with TC but a windows thing. Still this behavior is very annoying and I'd love to fix it somehow. Do you guys have any suggestions or recipes? Maybe something that involves cm_RereadSource may do?

Thank you very much.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Menu:
Configuration -> Options ... -> Refresh
[x] Refresh when files are created, deleted and renamed


HTH
Holger
Make our planet great again
Ahu_Lee
Junior Member
Junior Member
Posts: 37
Joined: 2016-08-09, 19:34 UTC
Location: Russia

Post by *Ahu_Lee »

HolgerK wrote:Menu:
Configuration -> Options ... -> Refresh
[x] Refresh when files are created, deleted and renamed


HTH
Holger
Thanks for this speedy reply, HolgerK. You are a great help!
Post Reply