Topic: Displaying text registers in Dialog boxes (1 of 4), Read 23 times
Conf: VEDIT Macro Language Support
From: Kevin August
Date: Wednesday, April 28, 2004 10:38 AM


Is there a way of displaying the contents of multiple text registers in a dialog box? The command '|@(register#) seems to work fine for only one text register without any options selected. What is the exact macro language of entering contents of multiple text registers and selecting a checkbox in choosing a particular text register?
Thanks

Kevin

 


Topic: Re: Displaying text registers in Dialog boxes (2 of 4), Read 24 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Wednesday, April 28, 2004 10:57 AM

At 10:39 AM 4/28/2004, you wrote:
>Is there a way of displaying the contents of multiple text registers in a dialog box? The command '|@(register#) seems to work fine for only one text register without any options selected. What is the exact macro language of entering contents of multiple text registers and selecting a checkbox in choosing a particular text register?

Kevin:

I'm sorry, but I don't understand your question. The syntax "|@(r)" - without the double-quotes - uses the contents of register 'r' for any portion of any item(s) in the Dialog_Input_1() command. Some dialog boxes are built from the contents of many text registers.

I would suggest examining the installw.vdm macro; many of the dialog boxes it displays are built from text registers.

Hopefully this helps - however I have no idea of what you mean by "selecting a checkbox...".

Ted.

 


Topic: Re: Displaying text registers in Dialog boxes (3 of 4), Read 27 times
Conf: VEDIT Macro Language Support
From: Fritz Heberlein
Date: Wednesday, April 28, 2004 12:53 PM

> Is there a way of displaying the contents of multiple text registers
> in a dialog box? The command '|@(register#) seems to work fine for
> only one text register without any options selected.

You could display contents of text registers in input boxes (up to 5,
according to the help file). But since input boxes are single lines,
this means that you cannot display strings longer than, say, 180
chars.

Your macro would first load five files into T-reg's, e.g.,

reg_load(5,"file1")
reg_load(6,"file2")
reg_load(7,"file3")
reg_load(8,"file4")
reg_load(9,"file5")

and then set up a dialog box like

#77=Dialog_Input_1(5,"`View @5 -- @9`,
'------------------------------------------------------------------',

'@5:',`??`,
'@6:',`??`,
'@7:',`??`,
'@8:',`??`,
'@9:',`??`,
",WORKAREA+BOTTOM+RIGHT+SET,0,0)



The contents of tregs 5 to 9 would then show up in the input boxes.
The dashed line would define the width of that boxes (experiment with
the optimal length).

Again, this is reasonably only, if you don't have more than 5 tregs
to display and the contents do fit in a single line.

A different thing is, if you want to control the display of the
contents of TRegs with an dialog box (which i would prefer).

Fritz
--

Dr. Friedrich Heberlein, Akad. Direktor
Seminar f. Klassische Philologie,
KU Eichstätt-Ingolstadt / Bayern
D-85071 Eichstaett

 


Topic: Displaying text registers in Dialog boxes (4 of 4), Read 19 times
Conf: VEDIT Macro Language Support
From: Pauli Lindgren
Date: Friday, April 30, 2004 11:18 AM

You can enter as many text registers inside the text strings as you wish. You must write the register id (e.g. "|(1)") inside the quotes, together with any other text.

Here is an example. The dialog box displays values of two text registers, next to check boxes. You can then select one or two check boxes, and the corresponding register contents are inserted in the file being edited.

Reg_Set(1,"First line of text")
Reg_Set(2,"2nd line is here")
#11 = 0
#12 = 0

#10=DI1(11,"`This is the Title`,
`[] |@(1)`,
`[] |@(2)`,
`[&OK]`,`[Cancel]`")

if (#10==0 || #10==2) { Return } // or Cancel

IT("OK") IN
if (#11) { Reg_Ins(1) IN }
if (#12) { Reg_Ins(2) IN }

--
Pauli