Page 1 of 1

Input dialog - variable problem...

Posted: 05 Aug 2016 16:06
by JTS
Hi. Im creating an Single choice dialog, where you can choose the text you have copied. There is a problem.

I have 3 global variables: global_clpb (List), global_lbIndex (Integer), global_lbIndexSelect (Integer)

First trigger - executed if clipboard changed.
Second - action (Copy text from clipboard)
Third: Script >

Code: Select all

addElement(global_clpb, global_lbIndex, clip_data);
global_lbIndex  =  length(global_clpb);
global_lbIndexSelect  =  (global_lbIndex  -  1);
The copied text is now added to the global_clpb.

-------------Now appears the Single chocie dialog:
atmg.jpg
atmg.jpg (101.85 KiB) Viewed 7994 times

The problem here is: in the editing-menu of this dialog I have list values: {global_clpb,listformat,comma}
Default value: {global_lbIndexSelect}

The idea: It should automatically select last copied text in the menu, but it doesn't do it. Why? Bug?

Re: Input dialog - variable problem...

Posted: 05 Aug 2016 18:41
by Martin
Hi,

The field Default value should be set to the actual text that should be selected, not the index.
Something like this could work if variable clip_data contains the text that should be selected:
{clip_data}

Regards,
Martin

Re: Input dialog - variable problem...

Posted: 05 Aug 2016 20:52
by JTS
Thanks. But maybe you want make normal listbox in the future..? :)

Re: Input dialog - variable problem...

Posted: 07 Aug 2016 18:42
by Martin
What do you mean by normal listbox?