sgp wrote: Very informative. Let me try to summarize my understanding of it. Although the thread title is just about mouse scrolling tabs, the underlying point is that TC lacks scripting capabilities, and some forum members are frustrated that Ghisler hasn't taken action so far. More frustration arises from 64-bit TC, which isn't fully compatible with external scripting engines, like powerpro and AHK_L, because many existing, member-developed scripts don't work with 64-bit TC. Is my summary correct?
Scripting in TC 32bit was always not straight-forward, but we made do - even with minimal support from Ghisler. Scripting in x64 is almost impossible - it can be done, but since so many "control-names" are called 'Window##' you cannot easily/or accurately query for a piece of info that can be used. Yes yer summary is pretty spot on.
I have 1000+ lines of scripts (mostly libraries) for interfacing AHK with TC - almost none of that works with x64. I don't need any libraries to interface with File Explorer, or MC (C++ program with proper control names) --- although I don't think it reacts to SendMessage/PostMessage that is easily worked around with it's Alias/UserDefinedCommands abilities.
There have been numerous suggestions on how to resolve this problem, every suggestion is shot down by Ghisler, or he claims it isn't possible, or he lies (or forgets?) about the actual capabilities of WM_COPYDATA that he finally implemented 3+ years ago. Where he states "WM_COPYDATA" can only return an integer... what he implemented 3 years ago isn't limited to only returning an integer. It's not limited in any way at all --- beyond the limitations he has created by what
can be queried. WM_COPYDATA could return Megabyte+ sized variables if needed (without memory leaks).
sgp wrote:I for one would love to see scripting added to TC. I tried scripting XYplorer and I was impressed at how easy and useful it is.
How are you finding multicommander's scripting engine? I know powerpro well and some AHK_L, is MC's scripting similar? What sort of things have you done with it?
Personally, I haven't done a whole lot with its scripting capabilities. A lot of my time has been consumed with staying on top of WebDevelopment changes, and trying to get our base (starting) platform off of Joomla to ProcessWire.
As far as I can tell, from discussions with Mathias (author), the forum ,(decent) documentation, and using some of the examples --- it seems to be about as robust as XYPlorer's scripting capabilities.
The syntax is pretty standard, so it's mostly just a matter of looking up what the MC (internal) function is. It does have one odd quirk, which you'll see in the examples below ::
@var $varname = "foo"; // to create/assign a variable
$varname // to query a variable.
$varname = "foobar"; // assign an already created variable.
(I've seen such syntax before, but it's not common).
Here's a few examples from
the MC Script docs
Search on google from the commandline bar
Take the parameters to this command and build a search url for google and then go to that url.
Create the command. then go to the Alias Manager and assign 'g' to "@<Unique command id>"
Code: Select all
function CreateGoolgeSearchQuery()
{
@var $query = "";
@var $n = 0;
for( $n = 0; $n < $argcount; $n = $n + 1 )
{
if( $n > 0 )
{
$query = $query + "+";
}
$query = $query + $arg($n);
}
return $query;
}
@var $s = "";
$s = "http://www.google.com/search?g=" + CreateGoolgeSearchQuery();
MC.Run CMD="{$s}" SHELL
View first *.txt file found in the folder currently in focus
Connect this command to a hotkey, for example ALT+V. When you then in the explorer panel have a folder in focus, if you press ALT+V and if a *.txt file exists under that folder, that file will now be shown.
Code: Select all
MC.DataViewer.View FILE={_findfirstfile( "{focusfilepath}\\*.txt" )}
Play First *.avi or *.mkv found in folder currently in focus
Connect this command to a hotkey, for example ALT+P. When you then in the explorer panel have a folder in focus, if you press ALT+P, the first *.avi or *.mkv found will be played in your default movie player.;
Code: Select all
@var $file;
$file = _findfirstfile( "{focusfilepath}\\*.avi" );
if(StrIsEqual($file,""))
{
$file = _findfirstfile( "{focusfilepath}\\*.mkv" );
}
MC.Run CMD={$file} SHELL
And yes, My sig is kinda assholish, but its pretty damned true, and it's about the only protest I know how to make. I'm sure in a few more years I wont care at all. And will leave like a number of other high-profile posters/users have in the past - which either moved on to Linux/Mac or other File Managers for Windows.
OT:
I showed the wife the thread about
TC 9... her response was something to the effect of, "I can't believe he just said he doesn't see any point in making his program 10% better. Why do those people (TC users) put up with his attitude??!" (Along her usual refrain to the odd post I show to her, "I can't believe he said that.", "I can't believe he said no cuz his users are *idiots", "I can't believe he said no, <insert some other excuse here>"
Which again, kinda proves my sig, no?
(*) Ghisler never used the term 'idiots' but phrased in a way that said, It might cause data loss in a rare case (UNDO function), user might expect X but in a rare case would get Y. Or his stance on Junction/Hardlink/Symlink support - that it's too complicated for his users (pretty close to calling us idiots). And in that case Ghisler flat out refused assistance from Hermann Schinagl to help integrate
Link Shell Extension with TC.
Or one of my **favorites
FTP Editing online Files (Improvement), which has been requested in some form or another since ~2005?... I think it was implemented in 2012-2013? I don't know I stopped using TC for FTP/SFTP. Easier to just locally edit, and run an "scp" script (to upload) when the file changed (locally). Or just use a SFTP aware editor.
(**) favorite, meaning: I couldn't freaking believe he found an excuse not to do that request either.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.