Making Quick Access Popup TC compatible

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

hi5,
Danke. :)

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

Hi,

I can open a special folder in the existing file list using commands (in AHK v1.1):

Code: Select all

intTCCommand := 2127 ; cm_OpenRecycled
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD

Code: Select all

intTCCommand := 2122 ; cm_OpenDrives
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD
But I can't find how to open the target special folder in a new tab of the existing window or in a second (or third) TC window. I tried to open a new window or a new tab before the SendMessage but it does not work if there is an existing TC window.

Code: Select all

intTCCommand := 2122 ; cm_OpenDrives
run, C:\totalcmd\TOTALCMD64.EXE /N ; new window
Sleep, 500
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD

Code: Select all

intTCCommand := 2122 ; cm_OpenDrives
run, C:\totalcmd\TOTALCMD64.EXE /O /T ; new tab in the existing window
Sleep, 500
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD
Any idea?
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

On another note, I can't make work the cm_OpenControls command to open the Control panel in TC:

Code: Select all

run, C:\totalcmd\TOTALCMD64.EXE
Sleep, 1000
intTCCommand := 2122 ; cm_OpenDrives
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD ; works
MsgBox, cm_OpenDrives worked
intTCCommand := 2123 ; cm_OpenControls
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD ; does not work
MsgBox, cm_OpenControls did NOT work
intTCCommand := 2127 ; cm_OpenRecycled
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD ; works
MsgBox, cm_OpenRecycled worked
This is the only special folders cm_ command not working.
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

To open a new tab you need to use another SendMessage first

Code: Select all

cm_OpenNewTab=3001 ;Open new tab
SendMessage, 0x433, %cm_OpenNewTab%, , , ahk_class TTOTAL_CMD
look in TOTALCMD.INC for all codes (if you haven't already) - there is also a section on Tabs.

The cm_OpenControls works fine here, both 32 and 64 bit. What does the error level say:

Code: Select all

intTCCommand := 2123 ; cm_OpenControls
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD ; does not work
MsgBox, cm_OpenControls did NOT work Errorlevel: %Errorlevel%
- note it can be a bit slow...
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

hi5 wrote:The cm_OpenControls works fine here, both 32 and 64 bit. What does the error level say:

Code: Select all

intTCCommand := 2123 ; cm_OpenControls
SendMessage, 0x433, %intTCCommand%, , , ahk_class TTOTAL_CMD ; does not work
MsgBox, cm_OpenControls did NOT work Errorlevel: %Errorlevel%
- note it can be a bit slow...
It just does nothing. I tried on 2 PCs (same config: Win 7 64-bit).
hi5 wrote:To open a new tab you need to use another SendMessage first

Code: Select all

cm_OpenNewTab=3001 ;Open new tab
SendMessage, 0x433, %cm_OpenNewTab%, , , ahk_class TTOTAL_CMD
look in TOTALCMD.INC for all codes (if you haven't already) - there is also a section on Tabs.
Yes, I've look at this lists but too quickly, obviously... I'll try it later tonight. Thanks.
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

It worked for me in w7&8 - perhaps you need to run AHK as admin if not already?
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

This works with the cm_OpenNewTab command (except for the Control Panel one)

Code: Select all

cm_OpenNewTab=3001
cm_OpenDrives := 2122
cm_OpenRecycled := 2127
cm_OpenControls := 2123
cm_OpenNetwork := 2125
cm_OpenDesktop := 2121

run, C:\totalcmd\TOTALCMD64.EXE
WinWait, ahk_class TTOTAL_CMD

SendMessage, 0x433, %cm_OpenNetwork%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenNewTab%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenRecycled%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenNewTab%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenControls%, , , ahk_class TTOTAL_CMD ; thid opens the recycle bin again
SendMessage, 0x433, %cm_OpenNewTab%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenDrives%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenNewTab%, , , ahk_class TTOTAL_CMD
SendMessage, 0x433, %cm_OpenDesktop%, , , ahk_class TTOTAL_CMD
This also work to open each special folder in an new instance of TC:

Code: Select all

cm_OpenNetwork := 2125
cm_OpenRecycled := 2127
cm_OpenDrives := 2122
cm_OpenDesktop := 2121

run, C:\totalcmd\TOTALCMD64.EXE, , , OutputVarPID
WinWait, ahk_pid %OutputVarPID%, , 15
SendMessage, 0x433, %cm_OpenNetwork%, , , ahk_class TTOTAL_CMD

run, C:\totalcmd\TOTALCMD64.EXE, , , OutputVarPID
WinWait, ahk_pid %OutputVarPID%, , 15
SendMessage, 0x433, %cm_OpenRecycled%, , , ahk_class TTOTAL_CMD

run, C:\totalcmd\TOTALCMD64.EXE, , , OutputVarPID
WinWait, ahk_pid %OutputVarPID%, , 15
SendMessage, 0x433, %cm_OpenDrives%, , , ahk_class TTOTAL_CMD

run, C:\totalcmd\TOTALCMD64.EXE, , , OutputVarPID
WinWait, ahk_pid %OutputVarPID%, , 15
SendMessage, 0x433, %cm_OpenDesktop%, , , ahk_class TTOTAL_CMD
So, the only issue remaining is the Control Panel not working for me. Running as admin should not be required, in my view.

Thank you again hi5.
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
Dalai
Power Member
Power Member
Posts: 9385
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

What does "it doesn't work" mean? Nothing happens? Can you open the control panel by typing cm_OpenControls in TC's command line? Do you hear some Windows sound after doing so?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

Dalai wrote:Can you open the control panel by typing cm_OpenControls in TC's command line?
Yes. It works.
Dalai wrote:Do you hear some Windows sound after doing so?
When typing manually? No. When using the SendMessage? No sound, no mouse pointer change. Really as if nothing happened.
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

SAVETABS to get a list of folders opened in TC file lists

Post by *JnLLnd »

Hi,

I'm reactivating this thread to come back on an issue discussed when I was developing Folders Popup. I'm now working on Quick Access Popup (new version of FP) and I have the same need to get a list of all folders opened in all TC file lists.

At some point in the thread, Dalai said:
Dalai wrote:If there were a command SAVETABS (as opposed to OPENTABS and APPENDTABS) this would be an easy task.
This has been added to the wishlist for TC v9 and has been developed. Thanks fo ghisler for this.

Now, I need to call the SAVETABS command (or SAVETABS2, more precisely) from an external program. For other commands, I use the SendMessage techniquel, for example, this AutoHotkey code:

Code: Select all

cm_CopySrcPathToClip := 2029
SendMessage, 0x433, %cm_CopySrcPathToClip%, , , ahk_class TTOTAL_CMD
What would be the technique to call SAVETABS2 from an AHK script? There is no command number associated to SAVETABS and, in this thread ghisler wrote that this command only works in button bar and start menu.

I'm not a TC automation expert. Any help would be appreciated.

Thanks,

Jean
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48074
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently the only way to do it is to create an internal em_something command with the SAVETABS command, and then call the em_something command like you call the cm_ commands.
Author of Total Commander
https://www.ghisler.com
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

Does the em_something command has to be created by the user for each installation? This would be a pre-requisite for QAP to call the command using SendMessage? Then QAP would need to check if the command exist and, if not, direct the user to a FAQ page on this.

I will need help with this. I'll ask for help from TC users on my support page. Or if someone here guide me step by step. I've seen the wiki page on internal commands but did not found about em_ commands.

Last question, ghisler: when you said "Currently the only way..." is it that we could hope for new developement on this to make it available from a cm_command?
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

I received this answer from Horst, a QAP + TC power user:
Hello Jean,
em_commands should be appended to the file usercmd.ini located in the TC Home dir.
Below an example from my file which contains 2 em_commands to save all open tabs into a file
and restore them.
em_commands are used the same way as cm_commands.
I suggest adding such commands by your set-up and manually for the portable version.

Example Usercmd.ini entries:

[em_savealltabs]
cmd=SAVETABS2L %COMMANDER_PATH%\SAVETABS2L.tab
menu=Save all tabs to file

[em_OpenSavedTabs]
cmd=OPENTABS %COMMANDER_PATH%\SAVETABS2L.tab
menu=Open tabs from file
For those interested, I will continue the discussion with him on my website.
http://www.quickaccesspopup.com/support/#comment-11574
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

JnLLnd wrote:For those interested, I will continue the discussion with him on my website.
http://www.quickaccesspopup.com/support/#comment-11574
Discussion has been moved to a page dedicated to TC support in QAP:
http://www.quickaccesspopup.com/how-do-i-enable-total-commander-support-in-quick-access-popup/
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Post by *hi5 »

For EM_commands you probably need WMCopyData - Check this thread http://ghisler.ch/board/viewtopic.php?t=32658 carefully
Post Reply