+ new redraw function
+ new regmsg function
+ new ini, set_ini functions
* wrong environment variables processing in redirection (after 126.96.36.1996)
* test function is renamed to eval (old name is supported for compatibility too)
+ 64-bit version of module added
+ commands to write numbers to internal array and read them back
First of all, I don't recommend to replace standard TCFS2.ini commands like tb1 and tb0, you may always create an item with another name.rilley wrote:Hello
I set total commander in config ini, to start without button bar = Successful
I set an hot key to the TCFS2 command but=tb1 tb0, witch is
tb0=delay(5000) tcm(2901), eval(hasButtonBar), tb1 Buttonbar Hide
tb1=tcm(2901), eval(!hasButtonBar), tb0 ; Buttonbar Show
When I press the specific key, the button bar shows up, and after 5 seconds it hide it self's,
My question is:
How can I make to hide it automatically when I click an button from the buttonbar?
As I got it, you want to have a command that shows BB for 5 secs or hides it immediately if it is visible, correct? It is possible to create single user-command that will do both things (note that I'm using standard tb0 command from sample TCFS2.ini here):
Code: Select all
Command: TCFS2.exe Parameters: /ef "run_item(tb0), eval(hasButtonBar) | tcm(2901) delay(5000) run_item(tb0)"
Code: Select all
Command: TCFS2.exe Parameters: /ef "if(hasButtonBar, run_item(tb0), tcm(2901)+delay(5000)+run_item(tb0)"
You don't need to modify TCFS2.ini at all, just create user-command with suggested parameters. You may then add it onto BB and assign a hotkey for it. And TCFS2 will hide BB on button click or hotkey press.
MVV: If I use one of your param, it help me a lot, if I press twice the same hot key, the buttonbar hide it self back, and it is good. (first time when I did it with my method of modify tcfs.ini was very buggy)
One question, is there any way, when I click an randomly button from the button bar, then to hide the buttonbar immediately, so I will not need to wait 5 seconds?
Thanks for support!
You can't do it using just TCFS2. You need a hook.rilley wrote:One question, is there any way, when I click an randomly button from the button bar, then to hide the buttonbar immediately, so I will not need to wait 5 seconds?
Simplest case is a thumbnails view toggle: click and it turns on thumbnails, click again and it turns on full list, click again for thumbnails, click again for full list, and so on. Is doing a toggle like this possible with your tools?
Second case, three way toggle, click for thumbnails, click again for full list, click again for brief list, repeat ... Is this possible?
If so, do you have some examples to start from?
You can look how command switch_viewmode_S works (in sample TCFS2.ini), it uses macroses L_viewMode and R_viewMode. But AFAIK not all modes can be detected in such way (read description for command LeftGetViewMode in TCFS2Tools Readme).
+ set ini string values
+ remove ini keys
E.g. set new default bar:
E.g. delete 20th entry from [MkDirHistory]:TCFS2 /ef "set_tcini(`Buttonbar`, `Buttonbar`, `%COMMANDER_PATH%\Bars\Default.bar`)"
Code: Select all
TCFS2 /ef "set_tcini(MkDirHistory, 20, )"
+ tem function is now able to pass parameters
+ send function allowing to pass keypresses
+ additional parameters for tcm, tem and msg functions allowing to send messages asynchronously
+ findwnd function finds TC window
+ sendmsg function sends messages to specific TC window
+ optional parameter for send function allows to specify window
+ tcd function changes dir(s) in TC
+ terminate button in report error message
* strings may now contain syntax characters like ';', '|' and '('
* strings may now be passed as substituted parameters
First of all, many thanks for these little charming apps. I love them, especially Tcfs2Tools, it works great except one thing.
I hide TC's Main Menu using Tcfs2Tools, then call the Main Menu pressing alt key, and works flawlessly so far. Selecting a menu item after, however, does nothing in 64-bit TC, nothing happens at all. It behaves as expected in 32-bit TC, btw. And, the same symptom with TrackMainMenu.
On the other hand, although there is no more to report in behavioral aspect, there exist one for display aspect. No 'underline' to acceleration keys in temporary main menu popped up by alt key. What I mean is: When the main menu enabled/shown, if you press alt key, underlines to the acceleration keys appear, like 'F&TP'. However, none with the temporary popped up main menu when the main menu is disabled/hidden via Tcfs2Tools, just plain like 'FTP', with both 32-bit & 64-bit TC.
Would you take a look into this? Thanks again.
Thank you for your report, I can reproduce it with TCx64 so I'll try ti fix it.Selecting a menu item after, however, does nothing in 64-bit TC, nothing happens at all.
I can't control underlining. Maybe you have enabled Windows option to hide shortcut keys? With this option shortcut keys are only visible when you open menu via keyboard (and I don't know how it works with programmed displaying). I always disable this stupid option in all Windows versions I work with and I always see underlined letters.No 'underline' to acceleration keys in temporary main menu popped up by alt key.
Posted after 2 hours 30 minutes:
I'm afraid menu items doesn't work in TCx64 because of some Lazarus stuff... If I don't hide menu after choosing menu items all work fine...
I also love your autorun plugin.Great that you like it.
I've been using AHK script to do the job via (G)SetMenu and TrackPopupMenu APIs, but, it became a little tedious in multiple TC's environment which I've been frequently exposed to after upgrading to Windows 8 recently, but more than that I prefer in-process to out-of-process control. The only concern about in-process control is that it may cause the process unstable, but, I've never observed any instability with your plugins, and they have small foot prints, almost felt like native TC functionality. Great job!
I used to turn on underline which was set to off defaultly. But, I decided to leave it to the default after upgrading to Windows 8. I can turn it on, back to old habit, but before doing that I got an idea. How about this?I can't control underlining. Maybe you have enabled Windows option to hide shortcut keys?
When showing the menu after intercepting alt key press: 'enable the menu' then send/simulate (another) 'alt key' press
The simulated alt key press should not be intercepted, of course. Although I don't know if it's possible to differentiate simulated keys from actual key presses without hook, maybe can simply ignore the 'first' alt key after simulating alt key... What do you think about it?
Oh, I wasn't aware of the Lazarus stuff.I'm afraid menu items doesn't work in TCx64 because of some Lazarus stuff...
No closing of the menu bar after selecting a menu item would be fine with me.If I don't hide menu after choosing menu items all work fine...
Thank you very much for taking a look into it.
It's not mine BTW.I also love your autorun plugin.
That's how I do it. I catch (no hooks but subclass so I can do anything) system menu command (uMsg==WM_SYSCOMMAND && wParam==SC_KEYMENU) and then show menu and pass it to TC so it can show and process menu normally. After processing I hide menu back.When showing the menu after intercepting alt key press: 'enable the menu' then send/simulate (another) 'alt key' press
TCx64 is built with Lazarus, not Delphi, so I think it has some non-standard side effects... For some strange reason TCx64 doesn't process menu messages if menu is absent.Oh, I wasn't aware of the Lazarus stuff.
But this means that it won't hide after tracking... Maybe you can try to send two commands in sequence using TCFS2: show menu and simulate Alt keypress (or send track command to TCFS2Tools) so it will work already now.No closing of the menu bar after selecting a menu item would be fine with me.
I see. Thanks for the explanation.That's how I do it. I catch (no hooks but subclass so I can do anything) system menu command (uMsg==WM_SYSCOMMAND && wParam==SC_KEYMENU) and then show menu and pass it to TC so it can show and process menu normally. After processing I hide menu back.
I now understand what it was implying...But this means that it won't hide after tracking...
Actually I've been using a similar method which was supposed to be temporary. I assigned F9 hotkey to SwitchMainMenu, then, press hotkeys F9 F10 consecutively, which almost felt like a single hotkey.Maybe you can try to send two commands in sequence using TCFS2: show menu and simulate Alt keypress (or send track command to TCFS2Tools) so it will work already now.