topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 8:32 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Utility to rename taskbar buttons/window titles?  (Read 21338 times)

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Utility to rename taskbar buttons/window titles?
« on: October 26, 2006, 07:48 PM »
Thought I'd ask this question here as well, seeing as there are a lot of knowledgeable people here :) Ever encountered software that insists on putting their application title in front of any open files / folders you might have? I have, and it frustrates me to no end. I know what applications I'm using, so there is absolutely no reason to keep reminding me at the expense of usability. What happens is that when you're having several copies of the same software open, there is no good way to distinguish them from each other.

My question then becomes, are there any utilities that will let me rename those taskbar buttons and window titles? I would prefer if I could make changes in a more permanent way by associate the changes with the window class or filename, but a less advanced method would also be a good start.

Any help would be greatly appreciated! :)
Registered nurse by day, hobby programmer by night.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #1 on: October 27, 2006, 10:44 AM »
Well.... I don't know any app that can do this. That doesn't mean it can't be done, though... ;)

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #2 on: October 27, 2006, 12:57 PM »
Well.... I don't know any app that can do this. That doesn't mean it can't be done, though... ;)

hehe, yeah... I seem to recall a harmless trojan once upon a time that allowed you to rename the taskbar buttons & window titles to your liking. Was fun using that to mess with a flatmate, but I don't think I'd want to install a virus just to achieve what I'm looking for ;)
Registered nurse by day, hobby programmer by night.

tim254

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #3 on: October 27, 2006, 01:51 PM »
I know Actual Windows Manager can change the Caption of a window on Startup.

http://www.actualtools.com/

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #4 on: October 27, 2006, 02:07 PM »
I know Actual Windows Manager can change the Caption of a window on Startup.

http://www.actualtools.com/


Thanks, that's almost exactly what I was looking for! :) It does seem to be slightly overkill for my needs, but who knows, I may need the other features later on..

EDIT: I think I spoke to soon. While it's close to what I needed, it doesn't allow me to just strip out parts of the window titles. Let's take a example of what I mean, Notepad++ names its windows this way: "Notepad++ - C:\Path\To\File.txt"
The problem with renaming the entire window title is that I'll have no idea what files are open, so I'm pretty much not any closer to a solution than I was :( Thanks for the help anyway though!
Registered nurse by day, hobby programmer by night.
« Last Edit: October 27, 2006, 02:17 PM by Dirhael »

vegas

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 357
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #5 on: October 27, 2006, 06:55 PM »
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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #6 on: October 27, 2006, 08:39 PM »
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.

I actually solved my own problem without the need to buy that application.. The lifesaver you ask? AutoHotKey of course ;)
Registered nurse by day, hobby programmer by night.

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #7 on: October 28, 2006, 10:49 AM »
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:
 before.pngUtility to rename taskbar buttons/window titles?

After:
 after.pngUtility to rename taskbar buttons/window titles?
Registered nurse by day, hobby programmer by night.
« Last Edit: October 30, 2006, 04:05 AM by Dirhael »

tim254

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 21
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #8 on: October 28, 2006, 04:46 PM »
Thanks for posting the solution!  One of these days I'll learn AutoHotKey....

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #9 on: October 28, 2006, 05:16 PM »
Thanks for posting the solution!  One of these days I'll learn AutoHotKey....

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 :)
Registered nurse by day, hobby programmer by night.

Actual Tools

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #10 on: October 30, 2006, 02:51 AM »
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.

Please could you specify where did you get such information? Currently we provide the free lifetime support for the registered users and the free minor upgrades. Do you still consider these conditions "not-so-fair"?

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #11 on: October 30, 2006, 04:07 AM »
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.



Please could you specify where did you get such information? Currently we provide the free lifetime support for the registered users and the free minor upgrades. Do you still consider these conditions "not-so-fair"?

Sounds very fair to me actually :) By the way, seeing as you're here now, what about a feature like the one I mention in this post?
Registered nurse by day, hobby programmer by night.

Actual Tools

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #12 on: November 02, 2006, 04:53 AM »
Sounds very fair to me actually :) By the way, seeing as you're here now, what about a feature like the one I mention in this post?

I'm not sure what exactly are you calling "a feature". Please explain your task, the desired way of its achievement, and what do you miss in the current version of Actual Window Manager. Thanks. (BTW, you may post a feature request at our forum; we consider all the requests and implement many of them.)

Dirhael

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 387
    • View Profile
    • defreitas.no
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #13 on: November 02, 2006, 12:26 PM »
Sounds very fair to me actually :) By the way, seeing as you're here now, what about a feature like the one I mention in this post?

I'm not sure what exactly are you calling "a feature". Please explain your task, the desired way of its achievement, and what do you miss in the current version of Actual Window Manager. Thanks. (BTW, you may post a feature request at our forum; we consider all the requests and implement many of them.)

Sorry, I should have explained it a bit better.. To better explain, consider the following scenario: I'm using an application like, let's say, Notepad++. The window captioning in this case is "Notepad++ - C:\path\to\open\file.txt" . Now, as this application let's you open several files in the same window (MDI), the window captioning will change depending on which "tab" you have open, yet the "Notepad++ -" always remains. Renaming the window with Actual Window Manager would in this case not be very useful seeing as if I renamed it to "C:\path\to\open\file.txt" and changed to a tab with a file named e.g. "anotherfile.txt", the window title would still say "C:\path\to\open\file.txt". This wouldn't really be of much use, as all it would do is to make things even more confusing.
This all leads me to the feature request; the option to strip out just parts of a window captioning, either by specifying a literate string to remove, or even better, using a regular expression. In my example above, all I would want to remove is the "Notepad++ -" part, but let the rest of the captioning change as usual.

Hope that explains it a bit better :)
Registered nurse by day, hobby programmer by night.

Actual Tools

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Utility to rename taskbar buttons/window titles?
« Reply #14 on: November 06, 2006, 03:46 AM »
Yes, this explanation is pretty clear, thanks. I have added your request to our suggestion base and would like to recommend you to subscribe to our newsletter so you won't miss the required release.