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.

Topics - ajax

Pages: [1]
Support and Feedback / How to transfer multi-scripts
« on: July 15, 2023, 18:20:42 »
One of the things I like most about MC (multicommander) is the ability to create custom scripts.  I now have quite a few of them.  However, when I implement a new release of MC my scripts are gone.  This might have something to do with the fact that I prefer to use the portable versions of MC because this allows me to install and try the new version without making any change to the old ones that are working just fine.

It seems like there ought to be a simple way to transfer the scripts used in the prior (portable) versions of MC to the new one.  If such a capability exists I haven't been able to figure out how it works.  I have reviewed the documentation and even done some experimenting.

What is the simplest way to transfer (a lot) of custom scripts to a new installation of MC?

Script / Array as argument in Mulit-script functions
« on: April 12, 2022, 16:36:57 »
Do functions used in multi-script scripts (i.e., user commands) allow arrays to be passed as arguments?  If so, I can NOT find relevant documentation in Online Manual.  Might there be some kind of documentation, possibly examples, that demonstrate such methods?

I could provide screen shots that demonstrate a test that shows partial but NOT complete success if that might be helpful.

Script / How export/import multi scripts?
« on: April 11, 2022, 16:50:37 »
Export/import may NOT be the best choice of terminology for this question.  However, I've been using Multicommander (MC) for quite some time now and during that time I've developed quite a few of my own scripts.  I run MC (and just about all Windows applications) in portable fashion.  This technique allows for new releases to be installed separately without making any changes to old releases.  In that, reserve the ability to revert back to prior releases should there be something that doesn't seem to work quite right in the new release.  This concept would probably have similarities to the situation where a new release of MC is installed on another (i.e., test) computer.

It seems to me that there ought to be a simple way to transfer my scripts from one instance of MC to another.  Another idea would be to configure MC such that the scripts reside in some other directories external to the MC executable files and can be shared among several instances of MC.

Is this possible?  If so, how?  If not, is there a recommended method for facilitating this kind of migration?

I'd like to be able to select multiple files and then execute a command on all of them.  For example, suppose I want to set the read only attribute on all of the files in a particular folder.

I've tried using the "User Defined Commands" feature to create an external command.  For my example I tried the following:

attrib +R ${focusfilepath}

This seems to work but only on a single file no matter how many have been selected.

Is it possible that doing this requires the use of a multi-script command rather than external command?  I have been able to process multiple files with such a command but writing such a command seems like quite a lot of bother for something as simple as this example.

This seems like a very normal thing to want to do and one could imagine a lot of different examples where all we want is to execute a single Windows command on a batch of files.  Hope there is a simple way to do it!

Script / Is it possible to append text to a file?
« on: April 13, 2020, 17:47:12 »
I can use the echo command to append text to a file but thought such a script would be cleaner if I could do it using something like the "SaveStringToFile" command.  However, it seems "SaveStringToFile" does NOT allow text to be appended to a file.  This seems like a very normal/natural thing to do.  Given how sophisticated the Multicommander scripting capability is it would be surprising to find this can NOT be done.

I'm thinking that first using "LoadStringFromFile" and then appending to that string before running "SaveStringToFile" might work but this could become unwieldy as the size of the file grows and I'd opt to stick with echo.

I hoping someone can clue me in about what I've failed to figure out.

I'm a bit of a newbie with respect to MC.  Very much want to use dual panel capability to run scripts on folders/files located in one part of the file system that affect other parts of the file system.  In that, make selections in one pane (? source) and operate on selections in the other pane (? target).  With some difficulty I have been successful writing some such scripts but have now discovered that making source and target selections is something I have yet to figure how to do.

Have spent a good bit of time in the Online Documentation which I'd generally say is very impressive but have yet to find anything describing the notion of dual panels and how they relate to each other.  I'm guessing that this has something to do with the commonly used but, as best I've been able to find, undefined meaning of the terms "source" and "target".

Would be grateful if someone could either refer me to what I haven't been able to find or possibly offer a precise definition of what these terms mean with respect to MC.

Script / Possible bug in Function StrTrimLeft()
« on: July 08, 2018, 20:34:07 »
It looks like there may be a bug in function (StrTrimLeft) which I'm using to separate the file name extension from the remaining part of the file name.  For whatever it is worth the files I'm working with are images and a typical extension is .jpg.  I'm using the StrRFind function to locate the right most period (".") in the filename.  Then StrSub to obtain the portion of the filename that includes everything up to the period.  This all works as expected.

However, when I then use StrTrimLeft to obtain just the file name extension I get different results depending on how the filename is composed.  In my case, whenever the filename has only one period (".") that separates the extension from the rest of the filename I get the expected result.  For example, if the filename is "PartA.jpg" I get the extension as ".jpg".  However, if the file name where "PartA.PartB.jpg" I get the extension as "jpg".  In that, an extra period (".") character is being trimmed.  The same, incorrect result, seems to occur whenever the filename contains more than one period (".").

Following are a couple of lines of code that experience the problem -

@var $linkname = StrSub($filename, 0, StrRFind($filename, "."));
@var $linkext = StrTrimLeft($filename, $linkname);

Script / How to run script on multiple files?
« on: July 04, 2018, 22:32:12 »
Is it possible to execute a script all of the files in a selection list?  If so how?

Still trying to do what provoked a previous post (,2212.0.html) but am past the documentation stage.  The MultiScript debugger does some nice things but even using it success is quite illusive.  Here are some suggestions which I think would make the debugger much more useful.

  • Need to be able to copy text from the panel that displays values, that the variables get set to, which can then be pasted elsewhere.
  • Before executing one of the commands that command needs to be expanded (i.e., variable substitution completed) and then displayed prior to being executed.

Based on inspection of variable values my scripts work correctly but something bad is happening when commands are invoked.

A minor suggestion would be to add a horizontal scroll bar to the panel used for outputting debugger results.  Even on my wide screen display the values are often out of view.

The significant capability of Multi Commander that captured my interest is the ability to create and use user defined commands/scripts.  Thought I was doing pretty good on my first one until trying to run it and finding that it failed.

I was able to find the log files which contained error codes but absent some explanation of what they mean they are pretty useless.  Is there a reference that would solve such problem?

Likewise, the procedure for creating a "Custom Command" is nicely documented but lacking some necessary details.  It appears as though my intuitive attempt to specify function arguments must have gotten it wrong.  A bit a trial and error hacking didn't overcome the problem.  Some elaboration on the meaning of these parameters also seems necessary for this to be an effective tool.

While the documentation for Multi Commander overall appears to be very nice the shortcomings mentioned above happen to be critical to my finding the use of Multi Commander to be worthwhile.

Pages: [1]