Multi Commander > Script

MultiScript Name selection excluding file extension?

<< < (5/6) > >>

Mathias (Author):
You forgot end parentheses

@var $pos = StrRegExpFind($text, "\s[a-z]" );


--- Quote from: Ulfhednar on December 07, 2015, 13:58:28 ---Mathias - do you think you will have time to polish/extend the debugger functionality or is it a non-priority?  I don't know how many of your users use it, even little things like having right click menu functions would be helpful to me sometimes.

--- End quote ---
Depends on what in the debugger that are missing need fixing. and what right click on it should do

However.. What are you trying to do.  Make First letter after space uppercase ? So "My small string" =>  "My Small String" ?
Then loop string if you find space then make the next character uppercase.. and continue..

Ulfhednar:

--- Quote from: Mathias (Author) on December 07, 2015, 14:39:13 ---You forgot end parentheses

--- End quote ---
Nooooooooo!  ::)  How the hell did I manage that?!?!!?


--- Quote from: Mathias (Author) on December 07, 2015, 14:39:13 ---@var $pos = StrRegExpFind($text, "\s[a-z]" );


--- Quote from: Ulfhednar on December 07, 2015, 13:58:28 ---Mathias - do you think you will have time to polish/extend the debugger functionality or is it a non-priority?  I don't know how many of your users use it, even little things like having right click menu functions would be helpful to me sometimes.

--- End quote ---
Depends on what in the debugger that are missing need fixing. and what right click on it should do

However.. What are you trying to do.  Make First letter after space uppercase ? So "My small string" =>  "My Small String" ?
Then loop string if you find space then make the next character uppercase.. and continue..

--- End quote ---
Yes that is what I am trying to do, & I will soon be trying to get the loop right...  Have only had about 10mins today tho as the missing ) shows!

I didn't really have anything super-special in mind for right click, standard commands for when I forget I have to use <ctrl>+X C A etc.
I would like to see the error codes defined. (That would be a cool tool-tip or right click option!!)

Mathias (Author):
The editor is Windows standard editor component so assumed that the noraml copy/paste was there.  Butlook like it is not
But Copy / paste using keyts work..  Ctrl+C / Ctrl+V

Here a snippet for Making first characters and characters after space upper.

--- Code: ---@var $text = "mY liTTle sTrIng";,

// make everything lower case
$text = StrToLower($text);

@var $maxLen = StrLen($text);

// set to 1 to begin with so the first char is made upper
@var $makeNextUpper = 1;

// Loop all characters, If Space is found make Next character upper
for( $pos = 0; $pos < $maxLen; $pos++)
{
   if($makeNextUpper == 1)
   {
     $text[$pos] = StrToUpper($text[$pos]);
     $makeNextUpper = 0;
   }
   
  if( StrIsEqual($text[$pos]," ") )
  {
    $makeNextUpper = 1;
  }
}
--- End code ---

Ulfhednar:
Many Thanks for your time on this Mathias
I can now see how MS loops should be made!  ;)
Hopefully that will allow me to develop my MS a little more.

makeNextUpper - is new?  Didn't see it in the docs when I searched.

The RMB menu isn't serious, it's a niggle when I do dumb things, e.g. I occasionally forget the absence of the RMB menu, hi-lite then lose the selection because I forget to use <Ctrl>+ C or whatever ...  :P

Mathias (Author):

--- Quote from: Ulfhednar on December 08, 2015, 19:43:42 ---Many Thanks for your time on this Mathias
I can now see how MS loops should be made!  ;)
Hopefully that will allow me to develop my MS a little more.

makeNextUpper - is new?  Didn't see it in the docs when I searched.

The RMB menu isn't serious, it's a niggle when I do dumb things, e.g. I occasionally forget the absence of the RMB menu, hi-lite then lose the selection because I forget to use <Ctrl>+ C or whatever ...  :P

--- End quote ---

makeNextUpper is a user declared variable.

After it gets the lenght of the string in $text it create the variable $makeNextUpper  and sets it to 1

--- Code: ---@var $makeNextUpper = 1;
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version