Directory Hotlist: TC changes control names (TC 7.5x)

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Directory Hotlist: TC changes control names (TC 7.5x)

Post by *StatusQuo »

Hi,

I found a strange/surprising new behaviour while testing with Duplicate_starter_menu_entry.ahk:

TC's Directory Hotlist configuration normally has buttons
- "TButton1"="Help" to "TButton7"="Add item".
After sending a SPACE to button "Change Title" they are
- "TButton1"="&>>", "TButton2"="Help" to "TButton8"="Add item".

=> The button list in the second case changed to the same as used in Starter menu
(although we are still in Directory Hotlist and button "&>>" is not visible).

This was introduced in TC 7.50. TC 7.04a didn't change its control names in this case.

Bug/flaw or new feature?


To reproduce:
  • call TC's Directory Hotlist configuration (Ctrl+D, configure)
  • put the focus on an existing line
  • check that the name of button "Help" is "TButton1" (with spy tool of your choice, e.g. AU3_Spy.exe, delivered with Autohotkey)
  • start the script below (=part of the whole script Duplicate_starter_menu_entry.ahk)
  • close the "Rename title" dialog and re-check the name of button "Help"
    => it changed from "TButton1" to "TButton2"

Code: Select all

#SingleInstance, Force

	; *** wait for & activate window
WinWait       , ahk_class TUSERMENUCHANGE, 
IfWinNotActive, ahk_class TUSERMENUCHANGE,, WinActivate, ahk_class TUSERMENUCHANGE, 
WinWaitActive , ahk_class TUSERMENUCHANGE,

	; *** press button "Change title" to get title of current entry
ControlSend, TButton4, {Space}, ahk_class TUSERMENUCHANGE	; Button "Change Title"
This short script will only work once. Before trying a second time, please close and re-open Directory Hotlist configuration.

XP SP3, TC 7.50 up to 7.55a pre2
(does NOT occur in TC 7.04a)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Cannot Duplicate.

Perhaps you are also running one of Samuel's AHK scripts like "QuickSearch eXtended" or "ButtonBar eXtended". Not sure about the current versions (I don't use) -- but older ones at least interfered with my own AHK script/hotkeys.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe it's a problem with Unicode support?
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2Balderstrom: Thanks for testing. It's reproducible here also under this quite clean conditions:
- XP SP3
- clean TC ini (/i=newfile) with TC 7.55a pre 1 (down to 7.50)
- current AHK version 1.0.48.05
- no other scripts in background (I didn't find the time to test/analyze Samuel's QuickSearch eXtended yet)

But I could not reproduce this under W2k and XP SP2 either, only XP SP3 (Home).
I'll try on another XP SP3 (Pro) system (hopefully tomorrow) to see if system settings/installed software may be causing it and report back.

2ghisler: I'm not sure if TC's Unicode support could be involved here. The official Autohotkey is still using ANSI, AFAIK.
I just send a Space character (should be ANSI) to TC's button. Can this cause problems?
If you know something I can test, please me know.

However, I can manage the button name change in my scripts, I just hope this is not causing bigger problems like memory corruption...
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Ah, sorry I am under W2K (so tested with that).
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

I tested this on several systems now and think it depends on the individual windows installation:
I got the changing control names on XP SP3 (both Home and Pro) and Vista SP1,
but NOT on one system running XP SP3 Pro and others running W2k and XP SP2 Home .

Tested on XP SP3 Home: It occurs even after restarting Windows in safe mode, running only TC (and the Spy tool to check the button names).

Weird. :(
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, TC doesn't change names of its controls, the names are given by AutoHotkey depending on the order of the controls. Maybe some buttons are hidden in one case but not the other?
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Close: A hidden button seems to get added into TC's interface: "&>>" (the visible buttons stay unchanged).
Below a list of all buttons (hidden and visible).
=> The second button list is identical to the one in Starter Menu...

I'd guess that you use the same dialog for Directory Hotlist and Starter Menu (with a flag to decide which variant to show) - and suddenly TC thinks, it is in Starter Menu?
(Directory Hotlist, initially) wrote:TButton1=Help
TButton2=Cancel
TButton3=OK
TButton4=Change &Title...
TButton5=&Delete Item
TButton6=Add s&ubmenu...
TButton7=&Add Item...
[quote="(after sending Space to button "Change title")"]TButton1=&>> (hidden)
TButton2=Help
TButton3=Cancel
TButton4=OK
TButton5=Change &Title...
TButton6=&Delete Item
TButton7=Add s&ubmenu...
TButton8=&Add Item...
[/quote]
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed I'm enabling/disabling that button even if it's invisible. I will try to change that.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Nice, TIA.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Fixed in TC 7.55a, thanks.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks for your feedback!
Author of Total Commander
https://www.ghisler.com
Post Reply