Page 1 of 1

Editing Titlebar document name

Posted: Fri Nov 07, 2003 12:02 am
by CWBillow
It'ld be a help to be able to trime the titlebar's showing of the document name to just the docment name, no path.

Regards,
Chuck Billow

Posted: Fri Nov 07, 2003 3:03 am
by CyberSlug
If you don't mind having a program running in the background to achive this, then look at this:

Code: Select all

;AutoIt 3.0.73 script named 'TextPadTitleBar.au3'  for TextPad 4.71
While (1)  ;infinite loop
	If WinExists("TextPad") 
		$t = StringTrimLeft(WinGetTitle("TextPad -"), 10)  ;removes 'TextPad - '
		$t = StringTrimRight(StringTrimLeft($t,1),1)       ;removes brackets
		WinSetTitle("TextPad -", "", $t)
	EndIf
	sleep(250)  ;pause for 250 millisecondse... probably not needed
Wend
The program requires AutoItv3.exe from http://www.hiddensoft.com/autoit3/ to run, and can the script can be stopped with a tray icon that appears.

Hope that helps

Posted: Fri Nov 07, 2003 5:32 am
by CWBillow
Cyberslug:

Thanks... I'll give it a shot.

Regards,
Chuck Billow
CyberSlug wrote:If you don't mind having a program running in the background to achive this, then look at this:

Code: Select all

;AutoIt 3.0.73 script named 'TextPadTitleBar.au3'  for TextPad 4.71
While (1)  ;infinite loop
	If WinExists("TextPad") 
		$t = StringTrimLeft(WinGetTitle("TextPad -"), 10)  ;removes 'TextPad - '
		$t = StringTrimRight(StringTrimLeft($t,1),1)       ;removes brackets
		WinSetTitle("TextPad -", "", $t)
	EndIf
	sleep(250)  ;pause for 250 millisecondse... probably not needed
Wend
The program requires AutoItv3.exe from http://www.hiddensoft.com/autoit3/ to run, and can the script can be stopped with a tray icon that appears.

Hope that helps