Multi Commander > Support and Feedback
Execute items programmatically
(1/1)
em:
Is there any way to execute an item programmatically in MultiScript, that takes into account the "File Type Setup"?
Something like MC.View or MC.Edit but for Launcher (Run/Open).
Regards,
Em
Mathias (Author):
You can use
"MC.CmdLineRun CMD=<command to run>"
It will run command like if they was run from the command line field. And it will use the FileTypeSetup for Run/Open.
But I think I will add a MC.Open (or something) that gives a bit more control (with working folders and parameters. )
em:
Very nice. Thank you.
Jungle:
I've set up *.txt and *.ini to edit/execute via akelpad. It works ok from the file panel. But:
1. If i launch command e.g. myfile.ini from command line, default program (notepad) is launched.
2. I've created user command MC.CmdLineRun CMD=${focusfilepath} and assigned it to a button. But when i click this button file is not launched, it is just focused instead as if i typed "myfile.ini" (with quotes) in the command line
Mathias (Author):
--- Quote from: Jungle on May 02, 2013, 10:47:57 ---2. I've created user command MC.CmdLineRun CMD=${focusfilepath} and assigned it to a button. But when i click this button file is not launched, it is just focused instead as if i typed "myfile.ini" (with quotes) in the command line
--- End quote ---
That is since a full path entered into the commandline field will make it go to that path.. But if you enter a ! before the path it will force to run it.. so
MC.CmdLineRun CMD=!${focusfilepath}
But using CmdLineRun for it is like a workaround, adding new custom command will make it work better and be able to control it better with STARTIN path and more.
hmm when thinking about it a new command might be unless. Better to add an option to MC.Run so it should just the FileTypeSetup
Navigation
[0] Message Index
Go to full version