Multi Commander > Script

MultiScript Name selection excluding file extension?

<< < (3/6) > >>

Mathias (Author):

--- Quote from: Ulfhednar on November 30, 2015, 19:28:52 ---Maybe using a MC.Command internal-type call to run MR (possibly silently) is a better way than a MS interface?

--- End quote ---
It is the same things. the MC.Command need to talk to something..


--- Quote from: Ulfhednar on November 30, 2015, 19:28:52 ---OT
this has made me wonder if I can call MDV to open files from outside MC - e.g. as a read-only notepad replacement in certain situations.

--- End quote ---
Yes but also no it will not work since it depends on stuff inside MC

Ulfhednar:
Thanks for the info Mathias.
Wasn't sure how deeply linked MC.Command & MS are.  I am interested in how you created the system & whether it is possible for someone to add to it.  I assume one needs to know a lot of your code though & that you are the only Expert.

I wondered about camel case for renaming in scripts.  I can see it would be easy to identify in a filename e.g. \s[a-z]+ but would I need to manually add the 26 options a-A to z-Z as I don't see a command that is case changing?
Although it is only 26 lines :P

Mathias (Author):
You can create plugins to MC that extended the script language, There is a SDK for plugins,  But you need to know C++ to create the plugins.

Not sure what you are trying to do with the regex for creating camel case. would it not be easier just to parse the string and change the case of the letters when needed ?
Regex can be very powerfull but you often have very little control of what is done. sometimes it is easier to do the regex work by hand.

Ulfhednar:
Thanks Mathias.  C++ is on my to do list :P
I am trying to identify my best approach for best use of time.  Comparing MS with things like PHP & Java I can see some elements which seem to have a greater similarity than with C++. 
I do have an interest in C++ as I perceive it as a more powerful tool.

I haven't figured out how to use MS to parse for case!   
I suppose I'd have to split the name to an array then tell MS to capitalize each segment....
Or is there a command/routine I can call (as this feature exists in MR)? :)

I just thought about what I know.  & I find the regex tool/concept interesting so it is a game for me running those.

Mathias (Author):
Yes, C++ is powerful but it can also be very hard to get correct, There is nothing protecting you from doing bad things in C++
Learn Php/Java well first before moving over to C++

A string is already like an array of characters. like in Php and Java (and C/C++,JavaScript)
you can access characters using the index operator.  [ ]


--- Code: ---@var $text = "MyString";
@var $pos = 1;
$text[$pos] = StrToUpper($text[$pos]);

// $text == "MYString"

--- End code ---


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version