Page 2 of 2

Posted: 2007-10-10, 06:21 UTC
by Stefan2
I would also like to use other keys on my keyboard
for shortcut keys, like Ä,Ö and Ü

I like to use Shift+Ä
I like to use Shift+#

Posted: 2007-10-10, 06:54 UTC
by VadiMGP
SanskritFritz wrote:Anyway, you can use AutoHotkey to define any shortcut key in TC.
I'm just interesting - does AHK allows to define hotkey that works in command line only?

Posted: 2007-10-10, 07:32 UTC
by icfu
Was that a rhetorical question? ;)

This script sends \ when # is pressed, only when focus is in command line:

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
#::
ControlGetFocus, v_Focus
If (v_Focus = "Edit1")
  SendInput, \
Else
  SendInput, {Raw}#
Return
Icfu

Posted: 2007-10-12, 19:12 UTC
by VadiMGP
icfu wrote:Was that a rhetorical question?
Nope. :wink: How you can ensure that "Edit1" belongs to command line or not? May be it is another editbox?

Posted: 2007-10-12, 19:47 UTC
by icfu
How you can ensure that "Edit1" belongs to command line or not?
The first line in the script ensures that the hotkey is only active when the TC main window is focussed, and because there is only one editbox in the TC main window, it has to be the command line. ;)

Icfu

Posted: 2007-10-12, 20:30 UTC
by VadiMGP
Ok, I see. And what if there will be loaded some sophisticated plugin like TotalConsole? Such plugin can create its own editbox that not belong to TC?

Posted: 2007-10-12, 21:47 UTC
by petermad
What if cm_EditPath is invoked - isn't that also an edit box?

Posted: 2007-10-12, 22:15 UTC
by icfu
What if cm_EditPath is invoked - isn't that also an edit box?
TInEdit.UnicodeClass1
And what if there will be loaded some sophisticated plugin like TotalConsole? Such plugin can create its own editbox that not belong to TC?
Editbox will have different instance number and it will be child of different control, in this case TFKon1.

You can also check the dimensions and/or location of editbox, etc...

Icfu

Posted: 2007-10-12, 22:38 UTC
by VadiMGP
Editbox will have different instance number
Of course, but how it is possible to know what instance number (as well as dimension and location) is right one?

Well, this is actually rhetorical question, I've got the point. :wink:

Posted: 2007-10-12, 22:41 UTC
by icfu
You check with AHK window spy, or AutoIt Window Info tool or use this script:
http://www.autohotkey.com/forum/topic8976.html

Just in case... ;)

Icfu

Posted: 2007-10-14, 13:14 UTC
by SanskritFritz
I actually had that problem in my Popup the splitter menu script :-) The only solution I found was to check the dimensions of TPanel, because funny enough, the splitter and the ftp panel have the same classes, and they vary the instance number!

Posted: 2007-10-15, 11:37 UTC
by icfu
the splitter and the ftp panel have the same classes, and they vary the instance number!
I have tried to reproduce that:
"Success" with TC 6.57, splitter instance number changes from 1 to 2 when FTP panel appears.

But, in TC 7 this is not reproducable anymore, the instance number does not change, so the problem seems to be fixed.

Icfu

Posted: 2007-10-15, 12:00 UTC
by SanskritFritz
2icfu
Thanks for testing it!