Multi Commander > Script

Can MC.RunUserCmd also run Multi Scripts (or only Custom commands)?

(1/1)

AlanJB:
Prompted by my question in http://forum.multicommander.com/forum/index.php/topic,1726.0.html

Can MC.RunUserCmd also run Multi-Scripts (or only Custom commands)?

I have a working Multi-Script bound to Ctrl+Backspace as follows:


--- Code: ---# Go to Drive Root
MC.RunCmd ID=ExplorerPanel.41053;
# Go to top
MC.RunCmd ID=ExplorerPanel.41075

--- End code ---

(Some of my tabs are locked below the physical drive root, so "Drive Root" is actually "Tab Root").

However, when I attempt to include this at the end of a new Multi-Script with

--- Code: ---...
...
MC.RunUserCmd ID=41137de592511df9a3a39b11165bcf44

--- End code ---

only the "# Go to Drive Root" is run.  The "# Go to top" never executes.

Any ideas?


Alan


Mathias (Author):
Running a command that run a command.
It is possible that it get some weird deadlook. It is nothing that is officially supported. if it works it works.. I think it depends on the commands that are called

RunCmd are normally not async, But depending on command the underlaying command can move on to a background thread and the command can return before it is complete.
but RunCmd has the "ASYNC" option.. With this it will just fire the command and move on.
But if you have multi commands like that in a MultiScript, it can have a strange affect. They might kind of collide if they are doing work in the same area

It running the MultiScript in the background it might be possible to call RunCmd with ASYNC and then do a Sleep( <time in ms> ) call before sending the other command.

Navigation

[0] Message Index

Go to full version