Multi Commander > Script

Select / deselect switch fault?

<< < (5/5)

Ulfhednar:
I am still wondering about moving the selection bar.
MC.Explorer.Select doesn't work mid script... So I thought maybe adding findfiles would. 
Also wondered if I can use findfiles with multiple exts?
e.g.

--- Code: ---$xx = FindFiles( $root + "*.gif" + "*.jpg" + "*.txt");
--- End code ---
Syntax?

Can I pass the result to

--- Code: ---MC.Explorer.Select = "{ $xx}"
--- End code ---

Haven't found correct way yet (if it's possible).  Or is there a better option?

I wanted to run an extract followed by a select & rename op.  As it is I cannot get the selection bar to where I want it...

Mathias (Author):

--- Quote from: Ulfhednar on June 08, 2014, 15:43:57 ---I am still wondering about moving the selection bar.
MC.Explorer.Select doesn't work mid script... So I thought maybe adding findfiles would. 
Also wondered if I can use findfiles with multiple exts?
e.g.

--- Code: ---$xx = FindFiles( $root + "*.gif" + "*.jpg" + "*.txt");
--- End code ---
Syntax?

--- End quote ---
No, multiple patters are not supported. It takes a path with a pattern.
You can run FindFiles multiple times or do "*.*" and then remove the files you do not want your self.


--- Quote from: Ulfhednar on June 08, 2014, 15:43:57 ---Can I pass the result to

--- Code: ---MC.Explorer.Select = "{ $xx}"
--- End code ---

--- End quote ---
There is no command named that..  maybe you mean MC.Explorer.Selection.Select , but no.. it takes a text filter of what to match.
and $xx from FindFiles is an array ( list of many text strings )

But As I said before. mixing CustomCommands and MultiScript in that way is not good. The work on different level.
Why not use the MultiScript rename function.. no need to select files..
CustomCommands are not made to be used as automation.

Ulfhednar:
Thanks Mathias.  I am trying to avoid mixing command types & thought multiple findfiles operations would probably be the best way, wanted to be sure.
I was thinking in steps

* extract
* select by .ext
* renameso have not thought of 'jumping' straight to rename, but if I can define what is renamed then that makes more sense.
If I can put in a mask, such as "*.jpg", it would solve my problem.
I will see how far I can get...  :)

Navigation

[0] Message Index

[*] Previous page

Go to full version