Input dialog - variable problem...

Post your questions and help other users.

Moderator: Martin

Post Reply
JTS
Posts: 4
Joined: 28 Apr 2015 15:53

Input dialog - variable problem...

Post by JTS » 05 Aug 2016 16:06

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 7995 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?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Input dialog - variable problem...

Post by Martin » 05 Aug 2016 18:41

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

JTS
Posts: 4
Joined: 28 Apr 2015 15:53

Re: Input dialog - variable problem...

Post by JTS » 05 Aug 2016 20:52

Thanks. But maybe you want make normal listbox in the future..? :)

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Input dialog - variable problem...

Post by Martin » 07 Aug 2016 18:42

What do you mean by normal listbox?

Post Reply