Topic: DI1-PAGER, a complete application and helper macro (1 of 3), Read 43 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Sunday, August 24, 2003 05:31 AM


Developed from the macro DI1-SCROLL.VDM in the previous thread "Scrollable text in DI1() for big dialogs" I created DI1-PAGER.VDM.

The macro now gets the text to display from a file of any length.

That text can be divided into "paragraphs" which are displayed one after another (forward/backward).

Every paragraph can have an optional label which is additionally displayed in the title of the dialog window.

If a paragraph is longer than a configurable number of lines, it is split into parts while being paged through.

Calling the macro with a label as an additional parameter lets the display start at that label.

A typical call could be:

Reg_Set(103, "C:\Data\Infotext.txt")
Reg_Set(104, "Usage")
Reg_Set(105, "Optional title overwriting the title from file")
Call_File(Reg_Free, "DI1-PAGER.VDM")


If the macro is executed without filling T-Reg 103 as parameter it displays the online help with the same technique.
So it's easy to try it out.


Since the macro uses Dialog_Input_1() it requires VEDIT for Windows.



Christian

 
DI1-PAGER.VDM (10KB)

 


Topic: DI1-PAGER, a complete application and helper macro (2 of 3), Read 24 times
Conf: VEDIT Macro Library
From: Peter Rejto
Date: Wednesday, March 03, 2004 08:18 AM

Hello. Christian,

I was looking for your Dialog_Input1 tutorial but could not find it. So, I am taking the liberty of asking my tutorial question here:

Do I remember correctly: In the old days I was advised to find a fre text register with the command

#104=Reg_Free

, in order not to overwrite a given T-reg. I was looking for such a protection in one your macros and could
find any.

In other words, can I put any value for "r" in the Dialog_Input1("r",....) macro? May be Vedit takes care of all the protection issues for me.

Thanks,

-peter.

P.S. Do I understand it correctly? Fritz uses this macro of yours to run his Tex Help System.

 


Topic: Re: DI1-PAGER, a complete application and helper macro (3 of 3), Read 23 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, March 03, 2004 11:57 AM

On Wed, 03 Mar 2004 08:18:00 -0500, Peter Rejto wrote:

>I was looking for your Dialog_Input1 tutorial but could not find it.

What tutorial?

I only posted a DI_1()-Demo in the thread
"Demo for the brilliant Dialog_Input_1() command"
and two tools in the threads
"Scrollable text in DI1() for big dialogs"
"DI1-PAGER, a complete application and helper macro"

All in this conference.


>Do I remember correctly: In the old days I was advised to find a fre text
>register with the command
>
>#104=Reg_Free
>
>, in order not to overwrite a given T-reg.

Preserving other's data is always good, yes. That is one possibilty.


>I was looking for such a protection in one your macros and could find any.

??? Do you mean "and could not find any." ?

May be.
In demos there often is only little security and preservation.
And in my other macros I may have used Reg_Push and Reg_Pop to save
values. Or have used registers which could be overwritten. Or so...

Peter:
*** Please be more detailed/concrete in your questions.
*** You are often speaking in riddles.
And then it's very hard to answer (and often too hard at all).

>In other words, can I put any value for "r" in the Dialog_Input1("r",....)
>macro?

That depends on your macro...

>May be Vedit takes care of all the protection issues for me.

No, absolutely not!
You have to code your macros by yourself to be save!
VEDIT is a nice platform for macros but has no AI built in (yet).


Christian