version-lasting key mapping problem

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
st
Junior Member
Junior Member
Posts: 84
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Post by *st »

IC. it's hoekey-like
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

HoeKey is just a basic hotkey app with some power commands, you cannot really compare it with AutoHotkey which is a scripting language. Even mentioning it in the same sentence with AHK is a sacrilege, really. ;)

Icfu
This account is for sale
User avatar
st
Junior Member
Junior Member
Posts: 84
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Post by *st »

icfu wrote:This script sends TC message cm_SelectAll when + is pressed and left or right panel is active.

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
~+::
ControlGetFocus, ActivePanel
If (ActivePanel="TMyListBox1" or ActivePanel="TMyListBox2")
  PostMessage, 1075, 523
Return
i don't C it working. 6.54a
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

The script is correct and works. Make sure you are using the latest AHK version.
Or do you need Numpad+?

Icfu
This account is for sale
User avatar
st
Junior Member
Junior Member
Posts: 84
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Post by *st »

1.0.42.03
R U advising me not 2 use Num+ @ all?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

The script is made for pressing +, not Numpad+.

If you need Numpad+ use this script:

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD
~NumpadAdd::
ControlGetFocus, ActivePanel
If (ActivePanel="TMyListBox1" or ActivePanel="TMyListBox2")
  PostMessage, 1075, 523
Return
This account is for sale
User avatar
st
Junior Member
Junior Member
Posts: 84
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Post by *st »

yeah. this works though it cannot stop TC's built-in keymapping, i.e., selection expansion dialog box.

Anyway it's still a bug 2 me not being able 2 set + to selectall, while - may be set to unselectall.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

yeah. this works though it cannot stop TC's built-in keymapping, i.e., selection expansion dialog box.

Anyway it's still a bug 2 me not being able 2 set + to selectall, while - may be set to unselectall.
Last lesson in AHK scripting, Numpad+ selects all, Numpad- unselects all, internal keymapping is ignored:

Code: Select all

#IfWinActive, ahk_class TTOTAL_CMD

$NumpadAdd::
ControlGetFocus, ActivePanel
If (ActivePanel="TMyListBox1" or ActivePanel="TMyListBox2")
  PostMessage, 1075, 523
Else
  Send, {NumpadAdd}
Return

$NumpadSub::
ControlGetFocus, ActivePanel
If (ActivePanel="TMyListBox1" or ActivePanel="TMyListBox2")
  PostMessage, 1075, 524
Else
  Send, {NumpadSub}
Return
Icfu
This account is for sale
User avatar
st
Junior Member
Junior Member
Posts: 84
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Post by *st »

hey. That's magic.
if possible, i'd like to know why "else" counts though we are running "if" branch. (2 lazy to study AHK)
thank you.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

if possible, i'd like to know why "else" counts though we are running "if" branch. (2 lazy to study AHK)
The If branch ends after one line if no brackets are used.

Icfu
This account is for sale
User avatar
st
Junior Member
Junior Member
Posts: 84
Joined: 2005-05-30, 01:39 UTC
Location: Beijing
Contact:

Post by *st »

so what makes the difference in TC's internal keymapping functioning is the prefix, $ & ~.
thank you. great "patch".
Post Reply