TC main window title - needs to have licensee name ?

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC main window title - needs to have licensee name ?

Post by *petermad »

2vianova
a question, how do you get your key in the registry?
First you have to convert you wincmd.key into a wincmd.reg Windows registry file - you can do that with this tool: https://madsenworld.dk/tcmd/tools/wincmd_reg.zip (don't ask me where I got it from - but it works).

Put wincmd_key_to_reg.exe and wincmd.key in the same directory and execute wincmd_key_to_reg.exe and wincmd.reg is created - now double-click on wincmd.reg and answer yes to the questions. Rename your wincmd.key file in your TC directory and restart TC and see if it worked.
Last edited by white on 2023-03-02, 14:17 UTC, edited 1 time in total.
Reason: Updated link
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
bogordo
Member
Member
Posts: 150
Joined: 2019-12-06, 09:07 UTC

Re: TC main window title - needs to have licensee name ?

Post by *bogordo »

petermad wrote: 2020-02-22, 14:25 UTC 2vianova
a question, how do you get your key in the registry?
First you have to convert you wincmd.key into a wincmd.reg Windows registry file - you can do that with this tool: https://madsenworld.dk/tcmd/tools/wincmd_reg.zip (don't ask me where I got it from - but it works).

Put wincmd_key_to_reg.exe and wincmd.key in the same directory and execute wincmd_key_to_reg.exe and wincmd.reg is created - now double-click on wincmd.reg and answer yes to the questions. Rename your wincmd.key file in your TC directory and restart TC and see if it worked.
Interesting Peter, any advantages of using this? (using TC in different PCs without carrying the key for example?)

Thanks,
Last edited by white on 2023-03-02, 14:18 UTC, edited 1 time in total.
Reason: Updated link
TC license #346559
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC main window title - needs to have licensee name ?

Post by *petermad »

No, it's for using TC from differnt directories on the same PC.

I have all versions of TC, including betas from TC 8 and forward on my harddisk for testing purposes. This way I don't have to put wincmd.key in the program dir every time at put a new version of TC in.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
comvox
Junior Member
Junior Member
Posts: 4
Joined: 2017-10-08, 01:52 UTC

Re: TC main window title - needs to have licensee name ?

Post by *comvox »

Valentino wrote: 2020-02-22, 14:22 UTC I don't know why they check it every 600 ms, maybe TC restores its title periodically.
I'm not sure that checking every 600 ms is necessary. Maybe once the title is changed, it remains changed until one exits TC. I left this in as I was modifying obeg's script which has it. The way it is, the script modifies the TC title even if you exit and then reenter TC. One might try setting the script to checking much less often, say to 3000 or 4000, if one wasn't worried that the original title might appear for a few seconds whenever one entered TC.

Alternatively, it would be easy to modify the script so that there is no loop at all, and it simply changed the TC title whenever you hit a hotkey. So you could just call that hotkey after starting TC.

Or one could have a script that called up TC with a changed title, thus avoiding a loop, but one would have to be careful to always call TC via that script.
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: TC main window title - needs to have licensee name ?

Post by *Ovg »

comvox wrote: 2020-02-23, 02:28 UTC Maybe once the title is changed, it remains changed until one exits TC.
Nope, e.g. when TC is restored from minimize state original title is restored
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC main window title - needs to have licensee name ?

Post by *Hacker »

Valentino,

Code: Select all

DesiredTcWindowTitle := "Total Commander"

Loop,
{
	Sleep, 1000
	If (WinExist("ahk_class TTOTAL_CMD", , DesiredTcWindowTitle))
		WinSetTitle, ahk_class TTOTAL_CMD, , % DesiredTcWindowTitle
}
0.8% of one CPU thread.

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
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Re: TC main window title - needs to have licensee name ?

Post by *Valentino »

2Hacker
In my case it consumes 0.08% CPU but it doesn't work :) Please check.
If I understand correctly it sets title to DesiredTcWindowTitle if it's already set to DesiredTcWindowTitle, no?
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: TC main window title - needs to have licensee name ?

Post by *Hacker »

Valentino,
Nope, it sets to DesiredTcWindowTitle if TC does not already have it. And yes, sorry:

Code: Select all

DesiredTcWindowTitle := "Total Commander"

SetTitleMatchMode, 3
Loop,
{
	Sleep, 1000
	If (WinExist("ahk_class TTOTAL_CMD", , DesiredTcWindowTitle))
		WinSetTitle, ahk_class TTOTAL_CMD, , % DesiredTcWindowTitle
}
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
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Re: TC main window title - needs to have licensee name ?

Post by *Valentino »

Now it works, thanks! And CPU usage is now acceptable.
HighDiver
Junior Member
Junior Member
Posts: 14
Joined: 2013-02-01, 16:53 UTC

Re: TC main window title - needs to have licensee name ?

Post by *HighDiver »

Thanks for that script - I did use it as a workaround but have come up with the following which I'd suggest as an improvement for the following reasons:
  • it modifies rather than replaces the titlebar - stripping off the hyphen and anything afterwards. So potentially useful information like the prefix number (if present) and TC version aren't lost;
  • if multiple TC windows are open, all are updated at once (the previous script would affect the selected window only).

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

TitleMarker := " - "

SetTitleMatchMode, 2
Loop,
{
	WinID := WinExist(TitleMarker "ahk_class TTOTAL_CMD")
	while WinID
	{
		WinGetTitle, Title, ahk_id %WinID%
		NewTitle := SubStr(Title, 1, (InStr(Title, TitleMarker) - 1))
		WinSetTitle, ahk_id %WinID%, , %NewTitle%
		WinID := WinExist(TitleMarker "ahk_class TTOTAL_CMD")
	}
	Sleep, 1000
}
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3278
Joined: 2003-05-06, 11:46 UTC

Re: TC main window title - needs to have licensee name ?

Post by *Sir_SiLvA »

petermad wrote: 2020-02-22, 14:25 UTC 2vianova
a question, how do you get your key in the registry?
First you have to convert you wincmd.key into a wincmd.reg Windows registry file - you can do that with this tool: https://madsenworld.dk/tcmd/wincmd_key_to_reg.exe (don't ask me where I got it from - but it works).

Put wincmd_key_to_reg.exe and wincmd.key in the same directory and execute wincmd_key_to_reg.exe and wincmd.reg is created - now double-click on wincmd.reg and answer yes to the questions. Rename your wincmd.key file in your TC directory and restart TC and see if it worked.
Is this tool still avaible somewhere?
Hoecker sie sind raus!
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: TC main window title - needs to have licensee name ?

Post by *petermad »

2Sir_SiLvA
Is this tool still avaible somewhere?
I have now put it here: https://madsenworld.dk/tcmd/tools/wincmd_reg.zip together with two similar tools
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply