Topic: Setting the title of the VEDIT application (1 of 10), Read 32 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Wednesday, May 31, 2006 10:04 AM


I often have more than one instance of VEDIT running.

Unfortunately it's not possible to tell which one to choose in
Windows Taskswitcher or via Taskbar because all have the same title "VEDIT".

The built-in command Win_Title() only is able to change the title of VEDIT's
editing windows, but not the application window itself.


With the help of the great tool AutoHotkey (http://www.autohotkey.com/)
I built a workaround for that limitation.

(For an experienced C- and Windows programmer it would be easy too.)


I wrote a little AutoHotkey-Script which sets the application title
of the currently active application to the given command line parameter.

title := ""

Loop %0%
{
param := %A_index%
title := title . " " . param
}

if title
{
WinGetActiveTitle, wintitle
WinSetTitle, %wintitle%, , %title%
}


Then I compiled that script with the integrated compiler to an executable
WinSetTitele.exe and put that resulting file into a directory
contained in PATH.

Now I'm able to do this in VEDIT:

Sys('winsettitle "VEDIT is really great"', SUPPRESS)


The same way one for example can write a little VEDIT macro which changes
that title dependent on the currently active file (what was my goal).

And that one is displayed in Taskmanager then :-)


Christian


PS: It would be nice if that could be done with a VEDIT command some time.

 


Topic: Re: Setting the title of the VEDIT application (2 of 10), Read 25 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Wednesday, May 31, 2006 02:12 PM


>The same way one for example can write a little VEDIT macro which
>changes that title dependent on the currently active file (what was
>my goal).
>
>And that one is displayed in Taskmanager then :-)

Here that macro,
to be filled into text register 114 (Buffer switch event macro)


Reg_Set(120, FILENAME)
if (Reg_Size(120)>0) {
Sys('winsettitle "VEDIT: |@(120)"', SUPPRESS)
} else {
Sys('winsettitle "VEDIT"', SUPPRESS)
}



Christian

 


Topic: Setting the title of VEDIT & Open URL at cursor (3 of 10), Read 27 times
Conf: VEDIT Suggestions
From: Ian Binnie
Date: Wednesday, May 31, 2006 11:24 PM

On 5/31/2006 10:04:36 AM, Christian Ziemski wrote:
>With the help of the great
>tool AutoHotkey
>(http://www.autohotkey.com/)
>I built a workaround for that
>limitation.

I have heard of AutoHotkey (but never used it - I have used a similar scripting tool BTEWin).

I copied this to Vedit, then tried to Open URL at cursor - getting an error. It is not difficult to delete the (), but the macro should be able to do this automatically.

>(For an experienced C- and
>Windows programmer it would be
>easy too.)

It is easy to change Title, I have done this often. The hard part is finding the window to change.

Changing the title of the active application, as you do below) is a bit too risky.

>I wrote a little AutoHotkey-Script which
>sets the application title
>of the currently active application to

 


Topic: Setting the title of VEDIT & Open URL at cursor (4 of 10), Read 26 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, June 01, 2006 02:33 AM

On 5/31/2006 11:24:35 PM, Ian Binnie wrote:
>
>I copied this to Vedit, then tried to Open URL at cursor - getting an error.

You are right, opening a new file doesn't seem to fire the Buffer Switch Event Macro (but I don't get an error message).
And closing a file doesn't do it either.

So it's faaaar from perfect.
But it only should be a simple workaround.

>It is easy to change Title, I have done this often. The hard part is finding the window to change.
>
>Changing the title of the active application, as you do below) is a bit too risky.

I know ;-)

So it would be nice to have such a command in VEDIT itself.

Christian

 


Topic: Setting the title of VEDIT & Open URL at cursor (5 of 10), Read 24 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, June 01, 2006 03:44 AM

On 5/31/2006 11:24:35 PM, Ian Binnie wrote:
>
>Changing the title of the active application, as you do below) is a bit too risky.


Here the more secure version. The Windows class is checked too now:


newtitle := ""

Loop %0%
{
param := %A_index%
newtitle := newtitle . " " . param
}

if newtitle
{
WinGetActiveTitle, oldtitle
WinGetClass, class, %oldtitle%
if (class = "vwCFrame")
{
WinSetTitle, %oldtitle%, , %newtitle%
}
}


Please consider these things experimental!

Christian

 


Topic: Setting the title of VEDIT & Open URL at cursor (6 of 10), Read 24 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Thursday, June 01, 2006 08:40 AM

An interactive dialog within VEDIT to set the application title.
I put that one into my {User} menu.

#103=Dialog_Input_1(103,"`VEDIT Title`,
`Please type in the title to be set`,
`??`,
`[&Ok]`,`[&Cancel]`",SET+APP+CENTER,0,0)

if ((#103!=1) || (Reg_Size(103)==0)) {
return
}
Sys('WinSetTitle.exe "|@(103)"', SUPPRESS)



Christian

 


Topic: Re: Setting the title of the VEDIT application (7 of 10), Read 20 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Monday, June 05, 2006 10:50 AM

At 10:04 AM 5/31/2006, you wrote:
>Unfortunately it's not possible to tell which one to choose in
>Windows Taskswitcher or via Taskbar because all have the same title "VEDIT".
>...
>PS: It would be nice if that could be done with a VEDIT command some time.

I had already asked Tom to change the Title to start with
the name of the first-open file. We will see if a command
mode option would be feasible too.

Ted.

 


Topic: Re: Setting the title of the VEDIT application (8 of 10), Read 21 times
Conf: VEDIT Suggestions
From: Pauli Lindgren
Date: Tuesday, June 06, 2006 05:13 AM

On 6/5/2006 10:50:04 AM, Ted Green wrote:
>
>I had already asked Tom to change the Title to start with
>the name of the first-open file. We will see if a command
>mode option would be feasible too.

It would be better if the title would display currently active file (as it does now when the document window is maximized).
However, it would be better if it would show only the filename, without path. This way, the filename would be visible on the taskbar.

Another enhancement loosely related to this would be an option to have different icon for different filetypes. Currently, all the files associated to Vedit have the same icon on Windows Explorer and in the file lists on Vedit's File Selector. Other editors display e.g. .c files and .h files with different icons. This makes it easier to find the correct file.
Even few icons with different colors would help, if you could choose the icon when associating filetypes. However, I don't know how this is done in other programs.

--
Pauli

 


Topic: Re: Setting the title of the VEDIT application (9 of 10), Read 23 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Tuesday, June 06, 2006 12:15 PM

At 05:13 AM 6/6/2006, you wrote:
>From: "Pauli Lindgren"
>
>On 6/5/2006 10:50:04 AM, Ted Green wrote:
>>
>>I had already asked Tom to change the Title to start with
>>the name of the first-open file. We will see if a command
>>mode option would be feasible too.
>
>It would be better if the title would display currently active file (as it does now when the document window is maximized).
>However, it would be better if it would show only the filename, without path. This way, the filename would be visible on the taskbar.

I mis-wrote. It will show just the filename of the currently active file.

>Another enhancement loosely related to this would be an option to have different icon for different filetypes. Currently, all the files associated to Vedit have the same icon on Windows Explorer and in the file lists on Vedit's File Selector. Other editors display e.g. .c files and .h files with different icons. This makes it easier to find the correct file.
>Even few icons with different colors would help, if you could choose the icon when associating filetypes. However, I don't know how this is done in other programs.

I'll have to add that to the suggestion list as that is a bit more complex. The hardest part is probably finding/creating the icons.

Ted.

 


Topic: Re: Setting the title of the VEDIT application (10 of 10), Read 26 times
Conf: VEDIT Suggestions
From: Ian Binnie
Date: Tuesday, June 06, 2006 10:03 PM

On 6/6/2006 12:15:57 PM, Ted Green wrote:
>At 05:13 AM 6/6/2006, you
>wrote:
>>From: "Pauli Lindgren"
>>
>>On 6/5/2006 10:50:04 AM, Ted Green wrote:
>>>
>>>I had already asked Tom to change the Title to start with
>>>the name of the first-open file. We will see if a command
>>>mode option would be feasible too.
>>
>I mis-wrote. It will show just the
>filename of the currently active file.
>

Different programs handle this in different ways.
Many MDI applications display the filename/tabname, some also include the Application Name (and others include all kinds of "useful" info).

I think that Application Name is essential.

Vedit will also need to cater for un-named windows.

If this is implemented, I would suggest:-
"Filename - Vedit", or just "Vedit" if unnamed.

FireFox (among others) works this way.

>>Another enhancement loosely related to this would be an option to have different icon for different filetypes. Currently, all the files associated to Vedit have the same icon on Windows Explorer and in the file lists on Vedit's File Selector. Other editors display e.g. .c files and .h files with different icons. This makes it easier to find the correct file.

This is one way to handle icons.

I often use different icons to identify shortcuts with different startup option (Vedit includes a good set of icons).

For console application this icon is used on the task bar etc, but for Windows applications this over-ridden by the RegisterClass call.

It would be nice to have an option in Vedit to use one of the other icons, although I am not so keen on the filetype icon.

It is easy enough to change the icon with SetClassLong (I do this to indicate programs which have been paused etc).

>>Even few icons with different colors would help, if you could choose the icon when associating filetypes. However, I don't know how this is done in other programs.
>

>I'll have to add that to the suggestion
>list as that is a bit more complex. The
>hardest part is probably
>finding/creating the icons.

I agree with Ted here.
Not being very artistic I fine creating an icon more effort that writing the code to use it.