7.50b2 start menu keyboard shortcut not always working

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

7.50b2 start menu keyboard shortcut not always working

Post by *mastabog »

Hi,

I've been trying to use the start menu in order to fire up a program with the file name under cursor (or path for that matter) as the parameter, e.g. %P%N. What happens is that

- if I use the mouse to open the Start menu and select the entry then it works
- if i used the assigned keyboard shortcut for that menu entry then it does not work (it appears to be ignored)
- if i use "?" as the first char in the parameter field to cause prompt window then it works even with when using keyb shortcut

example for a start menu entry called "hfs"

command: P:\httpd\hfs\hfs.exe
parameters: %P%N
shortcut key: ctrl-alt-f12

works if i use the mouse (Start menu > hfs), ignored if i press ctrl-alt-f12 but works if i use ?%P%N

I tried assigning other shortcut keys and also using the configuration menu and assigned a custom one (e.g. ctrl-shift-h) ... still no joy.

This bug was present in 7.04 as well and in previous versions but i was too lazy to report it. I now actually need this to be working properly :)

Cheers
Last edited by mastabog on 2009-05-14, 10:23 UTC, edited 1 time in total.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2mastabog
Works fine here (with HFS 2.3b235).

Which version of HFS do you use?

Are there any chance that you've got the same shortcut already defined in Configuration -> Misc panel and you simply forgot about it?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

Tried both the beta and the final version of HFS ... same result. It's been like this since 7.0. It failed with HFS 2.3b235 and b238 and the final.

The shortcut is not used for anything else since it does work if I use ?%P%N instead of %P%N (note the "?") as the parameter -- brings up the prompt window and then correctly passes it to HFS.

I tried with a simple batch script:

Code: Select all

@echo off
echo %1
pause
... and it works fine. Could TC not like something in the path (p:httpd\hfs\hfs.exe) or the shortcut?

I tried other shortcuts and no joy ... it doesn't fully start hfs.exe. I do see the mouse cursor briefly changing to the hourglass and then watching it with Process Monitor (from sysinternals) I do see hfs.exe starting but then exiting almost instantly.

Weird/interesting stuff:

- if i use ?%P%N then it works ... but i'd like it to work without the prompt.

- if I manually do it from the command line it works.

- if I put hfs.exe on the TC button bar and I drag and drop a file onto it, then it works fine.

- going through a batch script, i.e. calling a batch script that calls hfs.exe with the parameter and puting "pause" before the line that calls hfs then it works, otherwise it fails ... nothing happens (hfs.exe attempts to start according to process explorer)

- in the batch file, if i use "sleep -m 200" to sleep for 200 milliseconds (sleep.exe is available from windows 2003 resource kit or from your very own c-compiled program) then it works! ... 100 milliseconds and it fails!

- if I call the batch file manually from the command line, with or woithout the "sleep" then it works fine!

It's getting a bit frustrating and the failure happens only when using the shortcut from TC. Everything else seems to work fine, including using the mouse and the TC start menu. There seems to be something different and peculiar in the way TC calls the program when using a keyb shortcut in the start menu.

p.s. I'm using WinXP x64 by the way
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, maybe you have to set the start path for the program to the location of hfs.exe? Some programs fail to start if the start path isn't set to their location. If you don't set a start path, TC will set it to the current directory.
Author of Total Commander
https://www.ghisler.com
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

ghisler(Author) wrote:Strange, maybe you have to set the start path for the program to the location of hfs.exe? Some programs fail to start if the start path isn't set to their location. If you don't set a start path, TC will set it to the current directory.
Yes, I forgot to mention that I already tried that too ... still no joy. HFS is one of those programs that do not require being in the same directory when you run it but I did try both cases.

What could it possibly be?

I thought I could trick it by going through a batch script but it behaves exactly the same unless I sleep for about 300 milliseconds. It reminds me of multiprocess/multithreaded programming issues when you don't release the lock/mutex in time ... could it be something like that?
Post Reply