Author Topic: Run with CMD param "-AutoRun=userCommand" when an MC instance already running  (Read 3195 times)

jiabaoyu99

  • Newbie
  • *
  • Posts: 3
    • View Profile
I've already written a custom user command to get the active tab's path.
It works like a charm in MC. However, I planned to use it to pass the pass the autohotkey.

I read the manul and find that one can run MC using command line parameter "-AutoRun=userCommand" and invoke the user-command.

Sadly I found that if one instance of MC is already running, the user-command just doesn't invoke.

Is it a bug?
If not, does anyone here know autohotkey on how to send windows message to MC to fulfill my need?
Ref-> http://multicommander.com/Docs/MultiCommanderWindowsMessageAPI

Best regards.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
The -AutoRun parameter is sent to the instance you are starting. If "only allow single instance" is active. Then MC is already running and will then not call the AutoRun command.

You can command Hotkeys inside MC to user defined commands.

jiabaoyu99

  • Newbie
  • *
  • Posts: 3
    • View Profile
Thank you for the explanation ;)
So could you add a function that always invokes user command?
I barely know how to send windows messages. And I am using autohotkey.