Multi Commander Support Forum

Multi Commander => Script => Topic started by: zorglups on July 06, 2016, 16:02:20

Title: AskOption "editable" option
Post by: zorglups on July 06, 2016, 16:02:20
(re)Hello Matthias,

I need a AskText with a dropdown list.
Or a AskOption where I can freely enter text.

That is a ComboBox  ::)

Could you add one argument to the AskText function so that we can give an array of values to be shown in the dropdown list ?
eg:
<num> AskText( <str> label, <str> inputText, <num> option, <arr> values, <num> selected );
values : An array of strings or numbers that will be shown in the dropdown list.

Note: With the AskText, how can I know if the user pressed cancel or entered "0" ?  :-\

Thank you!!!

Pierre
Title: Re: AskOption "editable" option
Post by: Mathias (Author) on July 06, 2016, 22:28:39
it return 0 as a number if canceled
so if variable is a Num type.  it was canceled

Code: [Select]
@var $d = AskText("ddd" , "sss", 0 );
if( IsTypeNum($d) == 0 ) // $d is NOT num . 0 = false
{
...
}