Multi Commander Support Forum

Multi Commander => Support and Feedback => Topic started by: Archimede on November 06, 2021, 10:20:55

Title: filtercreate
Post by: Archimede on November 06, 2021, 10:20:55
The function
filtercreate();
seem no work: it return everytime 0.
I tryed to copy-paste the example from manual to program but the result is everytime the same... why?
Title: Re: filtercreate
Post by: Mathias (Author) on November 06, 2021, 10:59:04
Look at the UserDefinedCommands under the Examples section. There is a MultiScript named "Create Filter and Select"

This script works for me, so it should work.
Or maybe there is something else in you the script that makes it fail.
Title: Re: filtercreate
Post by: Archimede on November 13, 2021, 11:34:13
I wrote a no exact problem, sorry.
I need to define the explorer panel filter, like with MC.Explorer.SetViewFilter FILTER='{$VIEWFILTER}';
I made it.
Now I need to read the user filter; the manual tell to use the MC.Explorer.GetViewFilter but I no understand how I can to use it; in a MultiScript I tryed
@var $test = MC.Explorer.GetViewFilter;
but it no work; how I can to use that function?
Thank you very much
Archimede
Title: Re: filtercreate
Post by: Archimede on November 13, 2021, 12:36:40
Hallo.
Trying an searching I solved the problem.
I write the solution here for any interested:
MC.Explorer.GetViewFilter;
MessageBox( "test", $__CMDRESULT, 0 );

I suggest you to explain better the meaning and the use of $__CMDRESULT in the manual, AND explain better the use of MC.Explorer.GetViewFilter and other "get" functions.

Archimede
Title: Re: filtercreate
Post by: Mathias (Author) on November 20, 2021, 17:19:43
Hallo.
Trying an searching I solved the problem.
I write the solution here for any interested:
MC.Explorer.GetViewFilter;
MessageBox( "test", $__CMDRESULT, 0 );

I suggest you to explain better the meaning and the use of $__CMDRESULT in the manual, AND explain better the use of MC.Explorer.GetViewFilter and other "get" functions.

Archimede

MC.Explorer.GetViewFilter command are not a normal MultiScript command. it is a CustomCommand. this are simple commands that access things in MC via the same way the UI is. eg like when you click on something,
And MultiScript can call this higher level commands. problem is that they are fire and forget commands.. they can't normally return anything.

Normal MultiScript function acts with core function in MC.  problem is set/getfilter is somethings that exists in a higher UI level.
An the _CMDRESULT is a workaround to let some special custom commands return back information to the MultiScript engine