Author Topic: Run MC with parameters to select file in specified folder  (Read 4 times)

Pawel

  • Junior Member
  • **
  • Posts: 40
    • View Profile
I want to run Multi Commander via external application.
This application runs MC and pases 2 parameters. A directory path and file name.
I want to focus on RIGHT panel (for example) and select this file in this directory.
How to do this?

I see Multi Commander support -Autorun parameter that allows to run a script.
Here is my UDC script:

I need to run Multi Commander with specified

##########################################
#Name:SelectMyFile
#Type:function
#ID:3dc58130a89d422c841855e79ab4c6bd
#Desc:File Selection
#Options:Confirm
##########################################

MC.Explorer.Goto PANEL=RIGHT PATH="${param:0}" ItemFocus="${param:1}"



Multi Commander is running with this code (Delphi):
           
MCParams := '-AutoRun="SelectMyFile ' + '""' + DIRECTORY_PATH + '"" ' + '""' + FILE_NAME_WITH_EXT + '"""';
ShellExecute(0, 'open', PChar(PATH_TO_MULTI_COMMANDER), PChar(MCParams), PChar(EmptyStr), SW_SHOWNORMAL);

It should work, but it is not!
What do I do wrong?

-Pawel