Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - espkk

Pages: 1 [2]
26
Support and Feedback / Re: Multi tags in aliases
« on: April 15, 2016, 13:39:03 »
It's enough
Didn't find it
Ty again  :)

27
Support and Feedback / Multi tags in aliases
« on: April 15, 2016, 13:26:53 »
Is there a way to use multi tags in aliases(/command line)? My MC located in removable drive which is assigned with random drive letter in different devices. Using scripts for each alias is undesirable:c

28
Script / Re: Passing arguments to MC.Run
« on: April 15, 2016, 12:05:37 »
Works perfect! Thank you
(I was afraid putting arguments in quotes would force them to be passed with quotes too, but it works as required  :) )

29
Script / Re: Passing arguments to MC.Run
« on: April 13, 2016, 19:12:41 »
I'm not sure what you are trying to do..  How to you run the command, What do you want the script to do ?
The script should run specified app with specified arguments throw alias
The first argument is the application name which is stored in folder with the same name
I want to pass path to file with spaces which must be a single argument in double quotes
EsperoDrake
What about
Code: [Select]
return "\"" + $args + "\"";or
Code: [Select]
@var $args = "\"" + GetArgs() + "\"";
I think this would work, but I also need to pass other arguments after (or before) filepath
So, filepath must be quoted while other arguments should pass as is
Currently, MC command line deletes all double quotes ignoring \"(turns it to \, AFAIU)

30
Script / Passing arguments to MC.Run
« on: April 13, 2016, 13:03:24 »
Trying to use this script:
Code: [Select]
function GetArgs()
{
  @var $args = "";
  @var $n;
  for( $n = 1; $n < $argcount; $n = $n + 1 )
  {
       $args = $args + " ";
       $args = $args + $arg($n);
  }
  return $args;
}
@var $s = GetTagValue("${mcinstallpath}") + "\\..\\";
$s = $s + $arg(0);
$s = $s + "\\";
$s = $s + $arg(0);
$s = $s + ".exe";
@var $args = GetArgs();
MC.Run CMD="{$s}" ARG="{$args}"
The problem is the script trims double quotemarks splitting "a complex argument" into 3 arguments:

Code: [Select]
run test "a complex argument"
Quote
argc = 4
C:\mc\..\test\test.exe
a
complex
argument
So I can't send filepath with spaces
how to solve this problem?

31
Support and Feedback / Re: Relative path
« on: April 11, 2016, 15:56:47 »
Quote
but path with single backslashes in double quotes works well?
It only work if it fails to translate a escape character.. so you have have a path that is "SomePath\newpath" it will fail since \n is a escape character.
So use single quote.
MC.Run CMD="..\npp\notepad++.exe"
still works well
This is not a complaint but it looks strange  :)

32
Support and Feedback / Re: MC.Run ADMIN
« on: April 11, 2016, 15:48:13 »
Thanks! Works now
And what about running an app without admin rights from elevated MC? SHELL wouldn't help there. It's not provided?

33
Support and Feedback / MC.Run ADMIN
« on: April 08, 2016, 18:10:35 »
Property ADMIN don't work for me even for "MC.Run CMD="Notepad.exe" ADMIN" from example
Process rights depends on MC's: if MC elevated it ALWAYS run app with ADMIN otherwise without admin rights regardless ADMIN option
Windows 10 x64
What should I do? :)

34
Heh, tried with many version formats, but not with 'v...'   >:(
I do not understand why it's a plugin instead of a script, but OK  ;D
Ty

35
In (Tools>Special)
What does it mean? No docs or description on how to use

36
Support and Feedback / Re: Relative path
« on: April 07, 2016, 13:48:56 »
Thank you! Got it

37
Support and Feedback / Re: Relative path
« on: April 07, 2016, 12:36:06 »
Quote
GetTagValue() are a MultiScript function and can only be called from that command type. not from CustomCommand
Ofc I called it in multiscript
Quote
However I do know it can be confusing because a MultiScript can also call CustomCommands. But when doing embedded CustomCommand calls from MultiScript,  you can not use  MultiScript functions on that line. that line is run but the custom command engine.
Didn't get it  :( You mean the whole line runs in single engine?

Answer pls
Quote
It seems that MC.Run base path equils ${mcinstallpath} + "\", is this always the truth?
can I rely on that?

P.S. can you explain why this works:
Code: [Select]
MC.Run CMD="folder/file.exe";and this is not:
Code: [Select]
@var $cmd="folder/file.exe";
MC.Run CMD=$cmd;
this also works
Code: [Select]
@var $cmd="folder/file.exe";
MC.Run CMD="{$cmd}";
and this SOMETIMES works and sometimes throws an error(Out of memory error in program, reading NULL pointer in debugger):
Code: [Select]
@var $cmd="folder/file.exe";
MC.Run CMD={$cmd};

Also docs describe
Quote
Escape sequence consists of a backslash (\) followed by a letter. Each Escape sequence is regarded as a single character.
If you want an actual backslash in your constant string you need to write "\\". This will translate into "\".
but path with single backslashes in double quotes works well?

38
Support and Feedback / Re: Relative path
« on: April 06, 2016, 10:42:17 »
Thank you for your answer.
It's not perfect way but works for me:
Code: [Select]
function GetArgs()
{
  @var $args = "";
  @var $n = 0;
  for( $n = 0; $n < $argcount; $n = $n + 1 )
  {
    if( $n > 0 )
    {
       $args = $args + " ";
    }
    $args = $args + $arg($n);
  }
  return $args;
}
@var $exec = GetTagValue("${sourcepath}") + GetArgs();
MC.Run CMD="{$exec}";

It seems that MC.Run base path equils ${mcinstallpath} + "\", is this always the truth? Also, I have confused why this code works:
Code: [Select]
@var $exec = GetTagValue("${mcinstallpath}") + "\..\app\app.exe";
MC.Run CMD="{$exec}";
and this code also works:
Code: [Select]
MC.Run CMD=" "..\app\app.exe";and this is not:
Code: [Select]
MC.Run CMD= GetTagValue("${mcinstallpath}") + "\..\app\app.exe";What's the problem?

39
Support and Feedback / Re: Relative path
« on: April 05, 2016, 23:47:07 »
Thank you for the link. It solves the problem, but I still have a question
Is it possible to use relative path in MC address bar/alias(AFAIU they works the similar way)? I mean, is it possible to run X:\Folder1\file.exe from X:\Folder2\ opened in current tab without using scripts or sequence "cd+filename". It may look weird though sometimes it's useful

40
Support and Feedback / Relative path
« on: April 05, 2016, 09:57:09 »
How to use relative paths in MC cmd? Trying to exec ..\npp\notepad++.exe has no effect. cd ..\npp\ and running directly from cmd.exe folder works fine

Pages: 1 [2]