Topic: [Moved thread] Trouble with Out_Ins( ) (1 of 13), Read 70 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Tuesday, April 06, 2004 03:44 AM


[ Note from Christian (4/6/2004):
[ I moved this sub-thread from conference
[ "VEDIT Macro Library", thread "Preliminary VEDIT 6.12"
[ to here to be more appropriate.
[ Unfortunately Peter's original message got lost from
[ the thread, but Ted has quoted the important part below.



At 05:24 AM 3/30/2004, Peter Rejto wrote:
>I had trouble combining the Dir_Date() command with the Out_Ins() command. Specifically, I copied the example from the on-line help to the Win98 clipboard, edited it to be one line and copied it back to the Win98 clipboard. Then I used Ctrl-V to launch it in the Vedit Command Mode. I got a "bad
>parameter" error message.

Peter:

You have to change the "Out_Ins( )" to "Out_Ins()".

I force a space between the parentheses in the on-line help examples so that it is easier to read. Otherwise "()" looks like a large capital "0". I never considered that someone would literally copy the on-line help examples.

I will also try to fix the code so that "Out( )" works without an error.

Ted.

 


Topic: [Moved thread] Trouble with Out_Ins( ) (2 of 13), Read 68 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Friday, April 02, 2004 06:42 AM

On 3/30/2004 10:01:43 AM, Ted Green wrote:

>Peter:
>
>You have to change the
>"Out_Ins( )" to "Out_Ins()".
>
>I force a space between the
>parentheses in the on-line
>help examples so that it is
>easier to read. Otherwise "()"
>looks like a large capital
>"0". I never considered that
>someone would literally copy
>the on-line help examples.

Thanks Ted,

I have incorporated your suggestion into a small macro.
I called it EXA-UMM.VDM, for converting an example macro into a User-Menu-Macro. I shall try to upload it.

Then I tested my macro. This time, I used the Macro Language Manual. Specifically, I opened it with the usual, {Help, Macro Language} menu command and went to Chapter 4. First, I took the first multi line example macro. Second, copied it to my Vedit file, via my Win98 clipboard. Third, I ran my macro. Fourth, I copied the converted macro to my Win98 clipboard. Finally, I launched the converted macro in Command Mode, via the Ctrl-V key. It just worked fine!

Incidentally, I asked some my of colleagues who are Maple power users about the capitol O versus paranthesis issue. They had no reaction and suggested to use the Maple Text Search command, which I did. My search was not succesful. Then I opened a random maple worksheet file. There are found plenty of parantheses, but they were all filled with mathematical symbols. So, the use of paranthese with "empty arguments" must be a nice Vedit programming device.

-peter

 


Topic: [Moved thread] Trouble with Out_Ins( ) (3 of 13), Read 63 times
Conf: VEDIT Macro Language Support
From: Pauli Lindgren
Date: Monday, April 05, 2004 07:03 AM

On 4/2/2004 6:42:56 AM, Peter Rejto wrote:
>
> Fourth, I copied the converted
>macro to my Win98 clipboard. Finally, I
>launched the converted macro in Command
>Mode, via the Ctrl-V key. It just worked
>fine!

You do not need to use command mode for this.
I think it is easier to copy the macro to text register 100, and then use Misc -> Execute macro.
And this works with multi line macros, too.

--
Pauli

 


Topic: [Moved thread] Trouble with Out_Ins( ) (4 of 13), Read 62 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Monday, April 05, 2004 07:03 PM

On 4/5/2004 7:03:16 AM, Pauli Lindgren wrote:

>You do not need to use command mode for
>this.
>I think it is easier to copy the macro
>to text register 100, and then use Misc
>-> Execute macro.
>And this works with multi line macros,
>too.

Thanks Pauli,

I think I know how to incorporate your nice suggestion into my macro, for the case of a .pdf file. However, I am having a problem with a .hlp file.

More specifically, I do not know how to mark columnar blocks in a .hlp file. This might be needed to separate the macro from the rest of the text on the same line. For this reason I need an extra visual inspection of the content of the clipboard.

Looking forward to hearing from you.

-peter.

 


Topic: Re: [Moved thread] Trouble with Out_Ins( ) (7 of 13), Read 47 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Tuesday, April 06, 2004 04:25 AM

On Mon, 05 Apr 2004 19:03:00 -0400, Peter Rejto
wrote:

>More specifically, I do not know how to mark columnar blocks in a .hlp file.
>This might be needed to separate the macro from the rest of the text on the
>same line. For this reason I need an extra visual inspection of the content of
>the clipboard.


I would do the whole thing this way:

1. Copy the needed part of text (the example macro)
(via columnar block, if possible at source)
into the clipboard (Ctrl-C)
2. Insert clipboard into VEDIT (Ctrl-V)
3. Trim it if necessary (e.g. columnar block)
4. If still necessary: replace the "( )" with "()"
5. Copy it to T-Reg 100 and execute it from there.

Since the sources of macros might be so different I think there will
often be some handiwork left.


Christian

 


Topic: [Moved thread] Trouble with Out_Ins( ) (5 of 13), Read 50 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Tuesday, April 06, 2004 04:01 AM

On 4/5/2004 7:03:16 AM, Pauli Lindgren wrote:
>On 4/2/2004 6:42:56 AM, Peter Rejto
>wrote:
>>
>> Fourth, I copied the converted
>>macro to my Win98 clipboard. Finally, I
>>launched the converted macro in Command
>>Mode, via the Ctrl-V key. It just worked
>>fine!
>
>You do not need to use command mode for
>this.
>I think it is easier to copy the macro
>to text register 100, and then use Misc
>-> Execute macro.
>And this works with multi line macros,
>too.

Another easy way for executing macros is to add the following entry to the {Tools} or {User} menu:

2
Execute Macro from current buffer via @100
Reg_Copy_Block(100,0,ALL) Call(100)

So you can test your currently edited macro with one menu call.


Christian

 


Topic: [Moved thread] Trouble with Out_Ins( ) (12 of 13), Read 40 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Thursday, April 08, 2004 08:05 AM

On 4/5/2004 7:03:16 AM, Pauli Lindgren wrote:
>On 4/2/2004 6:42:56 AM, Peter Rejto
>wrote:
>>
>> Fourth, I copied the converted
>>macro to my Win98 clipboard. Finally, I
>>launched the converted macro in Command
>>Mode, via the Ctrl-V key. It just worked
>>fine!
>
>You do not need to use command mode for
>this.
>I think it is easier to copy the macro
>to text register 100, and then use Misc
>-> Execute macro.
>And this works with multi line macros,
>too.


Thanks Pauli,

Previously I have misunderstood your suggestion. Specifically, I thought that you suggest to remove my Ctrl-V keystroke at the end.

Now I realize, that your suggestion is to replace it by your
"text register 100 .. Misc..." routine. This has several benefits: I can work with the multi line macro, which is visually far superior to the 1-line version. It nicely isolates the use of the txt-word.vdm macro.


I have learned quite a bit from writing my exa-ummm.vdm. A big thank you to both Pauli and Cristian for their valuable suggestions!

-peter.

 


Topic: Re: [Moved thread] Trouble with Out_Ins( ) (6 of 13), Read 40 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Tuesday, April 06, 2004 04:25 AM

On Fri, 02 Apr 2004 06:42:00 -0400, Peter Rejto
wrote:

>I have incorporated your suggestion into a small macro.
>I called it EXA-UMM.VDM, for converting an example macro into a
>User-Menu-Macro. I shall try to upload it.

Peter:

are you sure that your macro really replaces the "( )" with "()"?

The following command
Begin_Of_File Replace("()","()",ALL+NOERR)
from you macro doesn't do anything! It replaces "()" with the same.
It's a typo only, I think.


Christian

 


Topic: Re: [Moved thread] Trouble with Out_Ins( ) (8 of 13), Read 44 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Tuesday, April 06, 2004 12:44 PM

On 4/6/2004 4:25:00 AM, Christian Ziemski wrote:

>Peter:
>
>are you sure that your macro
>really replaces the "( )" with
>"()"?
>
>The following command
>Begin_Of_File
>Replace("()","()",ALL+NOERR)
>from you macro doesn't do
>anything! It replaces "()"
>with the same.
>It's a typo only, I think.
>
>
Christian,

Thanks for proof-reading my macro! (I corrected this typo on my personal copy and I did not realize that I uploaded the uncorrected copy.)

You and Pauli certainly have made many more nice suggestions than I can follow up in a short time. So, I decided to
try to upload my corrected macro, right now. Then I shall do some more experiments, so that I can have a reaction to your suggestions.

Thanks for the new thread. This question certainly turned out to be more complex than I ever suspected. Incidentally, you have not lost anything in the transfer. I simply deleted an intermediate message of mine, which was no longer relevant.

Thanks for all your help.

-peter.

 


Topic: Re: [Moved thread] Trouble with Out_Ins( ) (9 of 13), Read 39 times, 1 File Attachment
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Tuesday, April 06, 2004 12:53 PM

OOPS,

I had trouble again, uploading my macro. Si, have deleted my previous macro and try once more.

 
Converts example macro to 1-line.

 


Topic: Re: [Moved thread] Trouble with Out_Ins( ) (10 of 13), Read 42 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Tuesday, April 06, 2004 02:55 PM

On Tue, 06 Apr 2004 00:53:00 -0400, Peter Rejto wrote:

>OOPS,
>
>I had trouble again, uploading my macro. Si, have deleted my previous macro and
>try once more.

Peter,

I (still) don't understand your troubles with uploading files,
but it seems to work now.

And it looks like you want to extend your training lessons in
uploading files: ;-)
The last macro version is completely commented out!?
Perhaps an early development version?


Don't panic! Don't bite in your keyboard!
It's only a computer...

And computers help solving problems
we never would have had without those computers.

Christian

 


Topic: Re: [Moved thread] Trouble with Out_Ins( ) (11 of 13), Read 44 times, 1 File Attachment
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Wednesday, April 07, 2004 05:13 PM

On 4/6/2004 2:55:25 PM, Christian Ziemski wrote:


>And it looks like you want to extend
>your training lessons in
>uploading files: ;-)
>The last macro version is completely
>commented out!?
>Perhaps an early development version?


Christian

Yes, I do! It turned out that I have corrected one typo and introduced another one. Incidentally, this time I have followed your suggestion as per, your message:

webboard.vedit.com?6409,29


Well, I try again with the upload. Here we go,

 
Corrected example to user-menu-macro

 


Topic: [Moved thread] Trouble with Out_Ins( ) (13 of 13), Read 25 times
Conf: VEDIT Macro Language Support
From: Peter Rejto
Date: Monday, April 12, 2004 05:37 PM

On 4/6/2004 3:44:45 AM, Ted Green wrote:
>
>[
>I will also try to fix the
>code so that "Out( )" works
>without an error.

Ted:

After making the "()" versus "( )" adjustment, as per your instructions, the example macro works for me.

At the same time I preceded it with a

#11=Buf_Free Buf_Switch

command. I definitely do not wish the example macro to sort my entire file.

In short, the "Out()" works for me.

-peter.