• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

How to change the key combination of a program

S

Stefan Mueller

Flightless Bird
I've a program (*.exe) which gets started just after the Windows logon
and which functionality I use. This program unfortunately uses the key
combination 'Ctrl + F5' to display an info message box. That's very
bad because I have another program where I really need the key
combination 'Ctrl + F5' and unfortunately the first program "wins" so
that if I use 'Ctrl + F5' the info message box appears.
Because the programmer of the first program doesn't offer any
possibility to change the key combination I'm trying to find a way to
change it by myself.

Here's my approach:
Somewhere in the program (*.exe) there must be some commands which
tell Windows what to do if someone uses the key combination 'Ctrl +
F5'. I'd like to edit that commands directly in the *.exe file (with
debug, hexedit, ...) so that not the key combination 'Ctrl + F5' is
used but e.g. 'Ctrl + F12'.
I think that should work but the problem is how to find the commands
which define this key combination.
In DOS it was the interrupt INT 9 (keyboard interrupt) so that I could
search for INT 9. However, I've no idea for what I have to search in
Windows XP.

Any help or idea how I could change the key comination 'Ctrl + F5' to
e.g. 'Ctrl + F12' is very appreciated.

Stefan
 
R

Rey Santos

Flightless Bird
Try this:

Create keyboard shortcuts to open programs
http://windows.microsoft.com/en-us/windows-vista/Create-keyboard-shortcuts-to-open-programs

--
Rey


"Stefan Mueller" wrote:

> I've a program (*.exe) which gets started just after the Windows logon
> and which functionality I use. This program unfortunately uses the key
> combination 'Ctrl + F5' to display an info message box. That's very
> bad because I have another program where I really need the key
> combination 'Ctrl + F5' and unfortunately the first program "wins" so
> that if I use 'Ctrl + F5' the info message box appears.
> Because the programmer of the first program doesn't offer any
> possibility to change the key combination I'm trying to find a way to
> change it by myself.
>
> Here's my approach:
> Somewhere in the program (*.exe) there must be some commands which
> tell Windows what to do if someone uses the key combination 'Ctrl +
> F5'. I'd like to edit that commands directly in the *.exe file (with
> debug, hexedit, ...) so that not the key combination 'Ctrl + F5' is
> used but e.g. 'Ctrl + F12'.
> I think that should work but the problem is how to find the commands
> which define this key combination.
> In DOS it was the interrupt INT 9 (keyboard interrupt) so that I could
> search for INT 9. However, I've no idea for what I have to search in
> Windows XP.
>
> Any help or idea how I could change the key comination 'Ctrl + F5' to
> e.g. 'Ctrl + F12' is very appreciated.
>
> Stefan
> .
>
 
P

Pegasus [MVP]

Flightless Bird
"Stefan Mueller" <seekware@yahoo.com> said this in news item
news:4a385252-9f80-4d53-b522-1fe81a0af7d3@e37g2000yqn.googlegroups.com...
> I've a program (*.exe) which gets started just after the Windows logon
> and which functionality I use. This program unfortunately uses the key
> combination 'Ctrl + F5' to display an info message box. That's very
> bad because I have another program where I really need the key
> combination 'Ctrl + F5' and unfortunately the first program "wins" so
> that if I use 'Ctrl + F5' the info message box appears.
> Because the programmer of the first program doesn't offer any
> possibility to change the key combination I'm trying to find a way to
> change it by myself.
>
> Here's my approach:
> Somewhere in the program (*.exe) there must be some commands which
> tell Windows what to do if someone uses the key combination 'Ctrl +
> F5'. I'd like to edit that commands directly in the *.exe file (with
> debug, hexedit, ...) so that not the key combination 'Ctrl + F5' is
> used but e.g. 'Ctrl + F12'.
> I think that should work but the problem is how to find the commands
> which define this key combination.
> In DOS it was the interrupt INT 9 (keyboard interrupt) so that I could
> search for INT 9. However, I've no idea for what I have to search in
> Windows XP.
>
> Any help or idea how I could change the key comination 'Ctrl + F5' to
> e.g. 'Ctrl + F12' is very appreciated.
>
> Stefan


Things have moved a long way since the "good old" DOS days where you could
cut into interrupts 9 or 21 to modify the actions taken when someone pressed
a certain key. Your chances of achieving the same with a 32-bit program are
very small indeed. I can see two possibilities for you:

a) Beg the manufacturer of one or both of your programs to give you a
customised version that uses a different keystroke.

b) Test a number of macro-programs (e.g. AutoIt) to see whether their
actions might affect your two applications differently. As an example: I use
Microsoft's "Keyboard Layout Creator" in order to remap certain keys such as
Ctrl+7. The program works perfectly in most cases except under MS Office
Applications. MS Office overrides my own definition of any Ctrl+whatever
key. It is conceivable that a similar thing happens with one of your two
apps when you redefine Ctrl+F12. By the way, the above keyboard creator is
unsuitable for you - it won't touch function keys.
 
D

dadiOH

Flightless Bird
Stefan Mueller wrote:
> I've a program (*.exe) which gets started just after the Windows logon
> and which functionality I use. This program unfortunately uses the key
> combination 'Ctrl + F5' to display an info message box. That's very
> bad because I have another program where I really need the key
> combination 'Ctrl + F5' and unfortunately the first program "wins" so
> that if I use 'Ctrl + F5' the info message box appears.
> Because the programmer of the first program doesn't offer any
> possibility to change the key combination I'm trying to find a way to
> change it by myself.
>
> Here's my approach:
> Somewhere in the program (*.exe) there must be some commands which
> tell Windows what to do if someone uses the key combination 'Ctrl +
> F5'. I'd like to edit that commands directly in the *.exe file (with
> debug, hexedit, ...) so that not the key combination 'Ctrl + F5' is
> used but e.g. 'Ctrl + F12'.
> I think that should work but the problem is how to find the commands
> which define this key combination.


I doubt you'd have much luck. Even if the program were disassembled it
would be difficult without comments for the code.

You might be able to disable Ctrl + F5 by using another program to define
that combo. Pegasus mentioned AutoIt, Hot Key Plus is another...
http://www.brianapps.net/hotkeyplus/

The problem is that if your misbehaving program is started after the program
used to define the combo it will likely grab it back. If it doesn't, there
is also the problem of defining what you want the combo to do...opening a
program is easy, doing something *within* a program is not.


--

dadiOH
____________________________

dadiOH's dandies v3.06...
....a help file of info about MP3s, recording from
LP/cassette and tips & tricks on this and that.
Get it at http://mysite.verizon.net/xico
 
T

thanatoid

Flightless Bird
Stefan Mueller <seekware@yahoo.com> wrote in
news:4a385252-9f80-4d53-b522-1fe81a0af7d3@e37g2000yqn.googlegr
oups.com:

<SNIP>

> Any help or idea how I could change the key comination
> 'Ctrl + F5' to e.g. 'Ctrl + F12' is very appreciated.


Look for a desktop utility with "F keys" or "keys" in the name.
I have several old ones, one is called TrayKeys IIRC, it lets
you set the 12 F keys (with Alt/Ctl/Shift modifiers, so a total
of 48 to do various things. Of course, SOME are system wide
presets, but there is enough left to work with.

Keymap and key remap are two others. I used key remap when I had
a great old clicky kbd without a windows key.


--
There are only two classifications of disk drives: Broken drives
and those that will break later.
- Chuck Armstrong (This one I think, http://www.cleanreg.com/,
not the ball player. But who knows. I can't remember where I got
the quote. But it's true.)
 
S

Stefan Mueller

Flightless Bird
Yea, the "good old" DOS days where we could cut into interrupts to
change something are gone.
However, because the key combination 'Ctrl + F5' (set by this
software) works from everywhere within Windows (Desktop, Excel, self
written programs,,,) there must be a "place" within Windows (e.g.
Registry) where this key combination is stored. Actually I've several
programs which use such key combinations and I guess that Windows
stores these key combinations somewhere because if you press such a
key combination Windows has to know if it's used by a program (do
what's written in that program code) or if it has to do the Windows
default function.
My question is now where these key combinations are stored?
Or am I totally wrong?

Stefan
 
B

Bob CP

Flightless Bird
Stefan Mueller wrote:
> Yea, the "good old" DOS days where we could cut into interrupts to
> change something are gone.
> However, because the key combination 'Ctrl + F5' (set by this
> software) works from everywhere within Windows (Desktop, Excel, self
> written programs,,,) there must be a "place" within Windows (e.g.
> Registry) where this key combination is stored. Actually I've several
> programs which use such key combinations and I guess that Windows
> stores these key combinations somewhere because if you press such a
> key combination Windows has to know if it's used by a program (do
> what's written in that program code) or if it has to do the Windows
> default function.
> My question is now where these key combinations are stored?
> Or am I totally wrong?
>
> Stefan


I suspect that if you try to edit any executable or system file, Windows
is going to detect the CRC change, at which time Windows will try to
replace yours with the original file, or simply refuse to run the program.

Have you tried Autohotkey?
 
S

Stefan Mueller

Flightless Bird
On Jan 14, 11:59 pm, Bob CP <ctcboa...@sbcglobal.net> wrote:
> I suspect that if you try to edit any executable or system file, Windows
> is going to detect the CRC change, at which time Windows will try to
> replace yours with the original file, or simply refuse to run the program..


I don't intend to edit any system file. I just want to find the
position in the executable where the key comination 'Ctrl + F5' will
be activated and change it e.g. to 'Ctrl + F12'.
However, the big problem is how to find this postion in the executable
if I don't know how these key combinations are set within Windows.

Stefan
 
T

thanatoid

Flightless Bird
Stefan Mueller <seekware@yahoo.com> wrote in
news:624f84d6-9f45-423e-8dc1-133489c96715@c29g2000yqd.googlegr
oups.com:

> On Jan 14, 11:59 pm, Bob CP <ctcboa...@sbcglobal.net>
> wrote:
>> I suspect that if you try to edit any executable or system
>> file, Windows is going to detect the CRC change, at which
>> time Windows will try to replace yours with the original
>> file, or simply refuse to run the program

> .
>
> I don't intend to edit any system file. I just want to find
> the position in the executable where the key comination
> 'Ctrl + F5' will be activated and change it e.g. to 'Ctrl +
> F12'.


Guess what? That is called editing a system file.

> However, the big problem is how to find this postion
> in the executable if I don't know how these key
> combinations are set within Windows.


If you /think/ you can reverse engineer the exe and find where
this is coded, than you certainly should be able to figure out
how to "set these key combinations within Windows" as well, or
vice versa. You are making this SO complicated.

Basically, you are going about this the wrong way. Just get
FKeys or whatever like it (there are dozens if not more, many
will be free) or just the good old KeyRemap and get THAT to do
what you want.

It seems you just enjoy complicating yours and other's lives.

Most things can be done with a few hits of keys rather than
anything discussed above, and there are apps which will do
whatever you want (open something, print something, connect to a
specific web site, play a specific mp3 track etc) with a simple
key combo.

If you can't remember the 30+ combos available with most of
those apps, you can print them out and tape them to the side of
your monitor.

Google.


--
There are only two classifications of disk drives: Broken drives
and those that will break later.
- Chuck Armstrong (This one I think, http://www.cleanreg.com/,
not the ball player. But who knows. I can't remember where I got
the quote. But it's true.)
 
S

Stefan Mueller

Flightless Bird
On Jan 18, 6:15 am, thanatoid <wait...@the.exit.invalid> wrote:
> If you /think/ you can reverse engineer the exe and find where
> this is coded, than you certainly should be able to figure out
> how to "set these key combinations within Windows" as well, or
> vice versa. You are making this SO complicated.
>
> Basically, you are going about this the wrong way. Just get
> FKeys or whatever like it (there are dozens if not more, many
> will be free) or just the good old KeyRemap and get THAT to do
> what you want.
>
> It seems you just enjoy complicating yours and other's lives.
>
> Most things can be done with a few hits of keys rather than
> anything discussed above, and there are apps which will do
> whatever you want (open something, print something, connect to a
> specific web site, play a specific mp3 track etc) with a simple
> key combo.
>
> If you can't remember the 30+ combos available with most of
> those apps, you can print them out and tape them to the side of
> your monitor.
>


Ups, I think I don't exactly understand what you mean.
You suggest to install an additional software which changes the key
combination 'Ctrl + F5' to 'Ctrl + F12'?
Actually, that's not really what I'd like to do because it's another
application which is also playing around with key combinations and
which can crash.
Okay, if it solves my problem, why not?

But my initial problem is that I have another program where I really
need the key combination 'Ctrl + F5' and many other key combinations.
I've this program written in Visual Basic.
Do you think that with an additional software there won't be any
conflicts with the keys?

Stefan
 
T

thanatoid

Flightless Bird
Stefan Mueller <seekware@yahoo.com> wrote in
news:466e8cab-9a2e-4625-88fc-bd7cdd82915a@r5g2000yqb.googlegro
ups.com:

<SNIP>

> Okay, if it solves my problem, why not?


INDEED.

> But my initial problem is that I have another program where
> I really need the key combination 'Ctrl + F5' and many
> other key combinations. I've this program written in Visual
> Basic. Do you think that with an additional software there
> won't be any conflicts with the keys?


Considering that there are only 3 applications in the world, and
ALL computers are set up identically, it should take me about 10
minutes to check and get back to you. SIGH.

IOW... TRY IT AND FIND OUT!


--
There are only two classifications of disk drives: Broken drives
and those that will break later.
- Chuck Armstrong (This one I think, http://www.cleanreg.com/,
not the ball player. But who knows. I can't remember where I got
the quote. But it's true.)
 
S

Stefan Mueller

Flightless Bird
On Jan 19, 2:48 am, thanatoid <wait...@the.exit.invalid> wrote:
> > Okay, if it solves my problem, why not?

> INDEED.
>

<snip>
>
> IOW... TRY IT AND FIND OUT!
>


Yes, it works!
It's not so cute but it works.

First of all I had to remove the application which uses 'Ctrl + F5'
from the registry so that it is not automatically started.

Then I wrote the following batch file which is called from the Windows
Startup:

echo off
cls
start hotkey.exe
==> In this tool I configured 'Ctrl + F5' to point to 'notepad.exe'.

sleep 1
start Application.exe
==> This application used to define 'Ctrl + F5' to show a message box.
Now it can't define 'Ctrl + F5' anymore because 'hotkey.exe' is
already using 'Ctrl + F5'.

sleep 2
kill -f hotkey.exe
==> Now I stop the hotkey tool so that 'Ctrl + F5' is not used by any
tool anymore.

Like mentioned, it works but I'm not so happy with the many sleep
commands and the kill command leaves the icon of the hotkey
application in the system tray. The icon only disappears if I move the
mouse over the icon. I was searching for a tool which refreshes the
system tray. Unfortunately without luck.

Anyway, thanks a lot for your help.
Stefan
 
T

thanatoid

Flightless Bird
Stefan Mueller <seekware@yahoo.com> wrote in
news:2583be3a-7beb-459a-9b6a-ca4afcaebb6a@m25g2000yqc.googlegr
oups.com:

<SNIP>

> Yes, it works!
> It's not so cute but it works.
>
> First of all I had to remove the application which uses
> 'Ctrl + F5' from the registry so that it is not
> automatically started.


You should have just used a startup control program. A great
(and deceptively simple) but highly recommended on many tech
sites - and I have been using it with very good results - is
Startup Control Panel by Mike Lin,
http://www.mlin.net/StartupCPL.shtml

> Then I wrote the following batch file which is called from
> the Windows Startup:

<SNIP>
> ==> Now I stop the hotkey tool so that 'Ctrl + F5' is not
> used by any tool anymore.


That's pretty cool - I like batch files myself, but I am
POSITIVE that you could find an app which will do this - for
some reason hotkey seems to be weird, but there are DOZENS more.

(See below...)

I don't like installing apps and then messing with all the
garbage after they /supposedly/ uninstall themselves, so I won't
try them, plus I still don't understand the EXACT problem you
were trying to solve, but I would definitely look around more.
If you are not perfectly happy with the results, find a program
that WILL do the job. Like I said, I am positive there is one
out there.

(...)

Compulsive me... Just Googled. Have you tried this one?
http://www.brianapps.net/hotkeyplus/

TINY, no install (so I have it running right now), etc. Added a
new combo. Seems to work just fine.

AND there ARE others. I just saw there is an MS app called
hotkey - is that's the one you are using? No wonder it is crap.
thanatoid's first rule of computing: NO MS PROGRAMS EXCEPT THE
OS.

<SNIP>

> Anyway, thanks a lot for your help.


YW and good luck. Try the brianapps one...


--
There are only two classifications of disk drives: Broken drives
and those that will break later.
- Chuck Armstrong (This one I think, http://www.cleanreg.com/,
not the ball player. But who knows. I can't remember where I got
the quote. But it's true.)
 
S

Stefan Mueller

Flightless Bird
On Jan 20, 5:52 am, thanatoid <wait...@the.exit.invalid> wrote:
> > First of all I had to remove the application which uses
> > 'Ctrl + F5' from the registry so that it is not
> > automatically started.

>
> You should have just used a startup control program. A great
> (and deceptively simple) but highly recommended on many tech
> sites - and I have been using it with very good results - is
> Startup Control Panel by Mike Lin,http://www.mlin.net/StartupCPL.shtml


Ok, that's one possibility but if I remove it from the registry it's
gone forever. I prefer that way but thanks for the hint.


> > Then I wrote the following batch file which is called from
> > the Windows Startup:

> <SNIP>
> > ==> Now I stop the hotkey tool so that 'Ctrl + F5' is not
> > used by any tool anymore.

>
> That's pretty cool - I like batch files myself, but I am
> POSITIVE that you could find an app which will do this - for
> some reason hotkey seems to be weird, but there are DOZENS more.
>
> (See below...)
>
> I don't like installing apps and then messing with all the
> garbage after they /supposedly/ uninstall themselves, so I won't
> try them, plus I still don't understand the EXACT problem you
> were trying to solve, but I would definitely look around more.
> If you are not perfectly happy with the results, find a program
> that WILL do the job. Like I said, I am positive there is one
> out there.
>
> (...)
>
> Compulsive me... Just Googled. Have you tried this one?http://www.brianapps.net/hotkeyplus/
>
> TINY, no install (so I have it running right now), etc. Added a
> new combo. Seems to work just fine.


Yes, that's exactly the tool I'm using. For simplification I called it
here just 'hotkey.exe'.
The "problem" is that it puts an icon to the system tray and if I kill
the application the icon does not disappear until you move the mouse
over the icon. Unfortunately there's no prober way to close this very
nice tool.

Many thanks for all your replies and the links. I appreciate it very
much.
But it seems that we are not exactly talking about the same.

I've a program (I call it here 'application.exe') which functionality
I need. This program unfortunately uses the key combination 'Ctrl +
F5' to display an info message box. That's very bad because I have
another program where I need the key combination 'Ctrl + F5' (not in
Windows itself but only in one Visual Basic application) and
unfortunately the first program (application.exe) "wins" so that if I
press 'Ctrl + F5' the info message box appears and not the function
I've defined in my Visual Basic application.

Therefore, I have to disable the key combination 'Ctrl + F5' which is
activated by the first application (application.exe). Because it's not
possible to disable this key comination within the tool I need another
program (e.g. hotkey.exe) which is loaded before and already defines
the key comination 'Ctrl + F5' so that the other application
(application.exe) can't define it. Afterwards I stop/kill 'hotkey.exe'
so that the key combination 'Ctrl + F5' is not assigned to any program
anymore.
Now I'm able to use the key combination 'Ctrl + F5' in my own Visual
Basic application.

My batch file approach works pretty well. There are "only" two things
I don't like:
1. sleep command to wait until the application before is started
2. kill command which leaves the icon of the HotKeyPlus application in
the system tray.

Stefan
 
T

thanatoid

Flightless Bird
Stefan Mueller <seekware@yahoo.com> wrote in
news:c9e05ed9-6a3d-4d68-b14a-81df8bd55cb4@g1g2000yqi.googlegro
ups.com:

> On Jan 20, 5:52 am, thanatoid <wait...@the.exit.invalid>
> wrote:
>> > First of all I had to remove the application which uses
>> > 'Ctrl + F5' from the registry so that it is not
>> > automatically started.

>>
>> You should have just used a startup control program. A
>> great (and deceptively simple) but highly recommended on
>> many tech sites - and I have been using it with very good
>> results - is Startup Control Panel by Mike
>> Lin,http://www.mlin.net/StartupCPL.shtml

>
> Ok, that's one possibility but if I remove it from the
> registry it's gone forever. I prefer that way but thanks
> for the hint.


I just assumed that if you had installed that app in the first
place, and had not removed it until this point, you DID
occasionally need/use it. The Startup Controllers have the
ability to disable/enable, nove to another user, or completely
delete an entry, and allow for disabling ridiculous resource
hogs like MS "indexing" etc.

<SNIP>

> The "problem" is that it puts an icon to the system tray
> and if I kill the application the icon does not disappear
> until you move the mouse over the icon. Unfortunately
> there's no prober way to close this very nice tool.


I didn't try that closing it, but there ARE others.
Let me try...

I'm not sure what you mean. I started it, then I right-clicked
on the icon and the program closed and the icon disappeared. I
am running on Win98SE Lite right now, but I see no reason why it
shouldn't do the same in XP. Why do you "kill" (if you mean via
task manager or other process viewer/controller) instead of
closing? Killing should be done only in "somewhat extreme" cases
since it can cause minor system instability (although I haven't
experienced it, plus in XP you can set the amount of time it
takes for it to force-die...)

I have an old PCMag app called EndItAll. It's at

http://dl016.filefactory.com/dl/f/age48de//b/7/h/2bc7173c9c5cada
cf04c232d/m/ad99a34f26399bfc19011283ddd95a52/n/2freeutils.zip

Worked very well and is VERY customizable. Haven't tried it on
XP but it should work. A process is a process.

For some reasons the file DL's as .mp3. Just change the
extension. The other utility is also very cool. Total
color/font/desktop appearance control.

> Many thanks for all your replies and the links. I
> appreciate it very much.
> But it seems that we are not exactly talking about the
> same.


YW. Yes, I still can't /quite/ understand what you are trying to
achieve... Some things are hard to explain/comprehend via text.

> I've a program (I call it here 'application.exe') which

<SNIP>
> 'Ctrl + F5' is not assigned to any program anymore.
> Now I'm able to use the key combination 'Ctrl + F5' in my
> own Visual Basic application.


I think I get it now...

OK... If it's your /OWN/ (I assume that means YOU wrote it) VB
app, why not CHANGE the Ctl-F5 to something else? You can make
it ANYTHING, right?

> My batch file approach works pretty well. There are "only"
> two things I don't like:
> 1. sleep command to wait until the application before is
> started 2. kill command which leaves the icon of the
> HotKeyPlus application in the system tray.


1 I don't understand, 2 /shouldn't/ happen.

Anyway... That's all I can offer. I have never written an app in
VB (let alone something more complex - well, I did "program"
Basic to draw a circle on the screen in 1987) although I've been
told it's not that hard... Fortunately I have always been able
to find utilities fairly easily - and I /still/ find new useful
ones all the time...

Cheers,
t.


--
There are only two classifications of disk drives: Broken drives
and those that will break later.
- Chuck Armstrong (This one I think, http://www.cleanreg.com/,
not the ball player. But who knows. I can't remember where I got
the quote. But it's true.)
 
S

Stefan Mueller

Flightless Bird
On Jan 20, 4:41 pm, thanatoid <wait...@the.exit.invalid> wrote:
> > The "problem" is that it puts an icon to the system tray
> > and if I kill the application the icon does not disappear
> > until you move the mouse over the icon. Unfortunately
> > there's no prober way to close this very nice tool.

>
> I didn't try that closing it, but there ARE others.
> Let me try...
>
> I'm not sure what you mean. I started it, then I right-clicked
> on the icon and the program closed and the icon disappeared. I
> am running on Win98SE Lite right now, but I see no reason why it
> shouldn't do the same in XP. Why do you "kill" (if you mean via
> task manager or other process viewer/controller) instead of
> closing? Killing should be done only in "somewhat extreme" cases
> since it can cause minor system instability (although I haven't
> experienced it, plus in XP you can set the amount of time it
> takes for it to force-die...)
>
> I have an old PCMag app called EndItAll. It's at
>
> http://dl016.filefactory.com/dl/f/age48de//b/7/h/2bc7173c9c5cada
> cf04c232d/m/ad99a34f26399bfc19011283ddd95a52/n/2freeutils.zip
>
> Worked very well and is VERY customizable. Haven't tried it on
> XP but it should work. A process is a process.


Great idea to close instead of to kill the program. 'EndItAll' looks
fine and works but I don't trust the place where I downloaded the
tool.
I found another small tool which can close a running application and
which also works fine:
http://www.beyondlogic.org/consulting/processutil/processutil.htm

Therefore 2) is solved (kill command which leaves the icon of the
HotKeyPlus application in the system tray).


> > I've a program (I call it here 'application.exe') which

> <SNIP>
> > 'Ctrl + F5' is not assigned to any program anymore.
> > Now I'm able to use the key combination 'Ctrl + F5' in my
> > own Visual Basic application.

>
> I think I get it now...
>
> OK... If it's your /OWN/ (I assume that means YOU wrote it) VB
> app, why not CHANGE the Ctl-F5 to something else? You can make
> it ANYTHING, right?


Yes, I could use another key combination but I don't want to.


> > My batch file approach works pretty well. There are "only"
> > two things I don't like:
> > 1. sleep command to wait until the application before is
> > started 2. kill command which leaves the icon of the
> > HotKeyPlus application in the system tray.

>
> 1 I don't understand, 2 /shouldn't/ happen.


Like mentioned, 2) is solved with 'process.exe'.
What I mean by 1) is that I don't like to use the command 'sleep.exe'.

start hotkey.exe
sleep 1
start Application.exe
sleep 2
process -q hotkey.exe

I'm using 'sleep 1' to wait 1 second until 'hotkey.exe' is loaded and
'sleep 2' to wait 2 seconds until 'Application.exe' is loaded. I don't
like the command 'sleep' because you never know if the application
before is loaded or not. Especially on a slower computer it could be
that the time entered in the command 'sleep' is too short.
Now I'm trying to do something like (to check if the application is
running):
start hotkey.exe

:WaitUntilHotKeyIsStarted
process -v hotkey.exe | find /i "hotkey.exe"
if not errorlevel 1 goto WaitUntilHotKeyIsStarted

start Application.exe

:WaitUntilApplicationIsStarted
process -v Application.exe | find /i "Application.exe"
if not errorlevel 1 goto WaitUntilApplicationIsStarted

process -q hotkey.exe

Stefan
 
T

thanatoid

Flightless Bird
Stefan Mueller <seekware@yahoo.com> wrote in
news:c4d7883e-b1a2-427b-b419-44e09e87bbc6@36g2000yqu.googlegro
ups.com:

> Great idea to close instead of to kill the program.
> 'EndItAll' looks fine and works but I don't trust the place
> where I downloaded the tool.


I uploaded those 2 programs since I consider them essential and
for some reason they are nowhere to be found. You can trust
them. Don't be so paranoid. You DO have an AV/malware scanner?
You should always scan ANYTHING, and many sites which seem
suspect are not and vice versa.

<SNIP>

>> OK... If it's your /OWN/ (I assume that means YOU wrote
>> it) VB app, why not CHANGE the Ctl-F5 to something else?
>> You can make it ANYTHING, right?

>
> Yes, I could use another key combination but I don't want
> to.


Ahhhh... (slight chuckle) That sounds just like me, but at my
ripe old age of 54 I would highly advise you to reconsider
changing some of your attitudes. Life is hard enough.

>> > My batch file approach works pretty well. There are
>> > "only" two things I don't like:


Programming stuff beyond my comprehension <SNIP>ped.




--
The arrows are faster than rodents!
- t.
 
Top