ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Utility to rename taskbar buttons/window titles?

<< < (2/3) > >>

vegas:
I've owned an Actual Tools license in the past, and I must drop a warning that you are only buying 3 months of support & future versions when you buy this product.  A very not-so-fair deal in my opinion. 
But still a well written & supported program, with good features.

Dirhael:
I've owned an Actual Tools license in the past, and I must drop a warning that you are only buying 3 months of support & future versions when you buy this product.  A very not-so-fair deal in my opinion. 
But still a well written & supported program, with good features.
-vegas (October 27, 2006, 06:55 PM)
--- End quote ---

I actually solved my own problem without the need to buy that application.. The lifesaver you ask? AutoHotKey of course ;)

Dirhael:
Just thought I'd add a script that does what I need, in case there are other with similar problems. This script in particular makes a few changes to Total Commander. It will replace the standard window captioning (which by default shows "Total Commander 6.55 - Registration name") with a much more useful current work path. Much more accessible & useful if you ask me :)
 
 
--- --- ;
 ; AutoHotkey Version: 1.x
 ; Language:       English
 ; Platform:       WinXX
 ; Author:         Dirhael (dirhael at gmail dot com)
 ;
 ; Script Function:
 ; Enables the display of the currently active work path in Total Commanders window captioning
 ;
 
 #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
 #SingleInstance ignore ; Only allow one running copy of this script
 #NoTrayIcon ; We don't need the tray icon for this script
 SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
 #MaxMem 1 ; While it's probably not needed, try to use as little memory as possible
 
 SetEnv,tcpp_exe,TCPowerPack.exe ; The name of the Total Commander Powerpack executable
 SetEnv,tc_exe,totalcmd.exe ; The name of the regular Total Commander executable
 SetWorkingDir %A_ScriptDir% ; Make sure that we're working in the same folder as the script's located in.
 
 IfWinNotExist ahk_class TTOTAL_CMD
 {
 
  Run, %A_WorkingDir%\%tcpp_exe%, , UseErrorLevel ; Check for TC Powerpack and run if found
 
  if ErrorLevel = ERROR ; Attempt to run the regular version of Total Commander if we can't find TC Powerpack
  {
  Run, %A_WorkingDir%\%tc_exe%, , UseErrorLevel ; Check for regular Total Commander and run if found
  }
 
  if ErrorLevel = ERROR ; Error message and exit if we can't start the application
  {
  Msgbox, 16, , ERROR: Unable to launch Total Commander.`n`n%A_WorkingDir%\%tcpp_exe% -> File Not Found!`n%A_WorkingDir%\%tc_exe% -> File Not Found!`n`nPlease make sure that you are running this application from the same directory as one (or both) of the above executables are located.
  ExitApp
  }
 
 }
 
 
 Loop
 {
  WinWaitActive ahk_class TTOTAL_CMD ; No point in continuing until the Total Commander window is active
  {
  ControlGetText, text, TMyPanel2 ; Get the current path from the "command prompt" toolbar (will work even if it's not displayed)
  StringTrimRight, text, text, 1 ; Get rid of the rightmost ">" character
  WinSetTitle %text% ; Set the title captioning
  }
 
  IfWinNotExist ahk_class TTOTAL_CMD ; If Total Commander isn't running, we'll just exit here
  ExitApp
 }
 
 It will first attempt to launch Total Commander, and keep running until you shut down TC. If you'd like to use it, keep in mind that you'll have to copy it to your TC folder. I've just compiled it, copied it to the correct folder, and changed my start menu shortcuts accordingly :)
 
 
 Here's a before and after screenshot:

Before:
 Utility to rename taskbar buttons/window titles?

After:
 Utility to rename taskbar buttons/window titles?

tim254:
Thanks for posting the solution!  One of these days I'll learn AutoHotKey....

Dirhael:
Thanks for posting the solution!  One of these days I'll learn AutoHotKey....
-tim254 (October 28, 2006, 04:46 PM)
--- End quote ---

It's not really that hard to get started with, but I think it'll be a long time until I fully understand it all. It's just one of those applications that once it's installed, you can't really imagine how you ever managed to live without it. I originally installed it as I have a Swedish keyboard, and while I really like it, I needed to have the Norwegian versions of the letters ÄÖ (ÆØ) without having to change the layout itself. That part was very easy to do, but I almost forgot I even had it installed until I needed to get this thing done :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version