Topic: VED-VER - Version output for external use (1 of 14), Read 15 times
Conf: VEDIT Macro Library
From: John H
Date: Tuesday, May 04, 2004 12:10 PM

The latest release of 6.12.1, DOS version, includes new version text
so I added a version check. Anyhow, here is the macro as I am using
it.

Original is here:
http://vedit-macro-language.17695@.../read?17670,30

--
John


----------------8<----------------------
// VED-VER.VDM Date: 04-29-2004 Time: 23:15:15
// Date: 05/04/04 DOS version 6.12.1 now includes (DOS)
// in version text
//
// Macro to output version & serial number information of vpw[64].exe
// and vedit.exe to a text file with windows INI file structure.
//
// syntax: vedit|vpw[64] [-g] -q -x ved-ver
//
// The "-g" parm is used simply to bypass the errors / block to run
// this macro with a DOS-WINDOWS shared installation of VPW v6.12+ &
// VEDIT (DOS) < v6.12
//
// Output file is 8.3 named to maintain functionality with VEDIT-DOS

if (File_Exist("VED-VER.INI")) {
File_Open("VED-VER.INI")
#10=Buf_Num
} else {
#10=Buf_Switch(Buf_Free(EXTRA))
Ins_Text("[VEDIT]")
Ins_Newline(1)
Ins_Text("VESN=")
Ins_Newline(1)
Ins_Text("VE16=")
Ins_Newline(1)
Ins_Text("VE32=")
Ins_Newline(1)
Ins_Text("VE64=")
Ins_Newline(1)
}


Buf_Switch(Buf_Free(EXTRA))
Out_Reg(10)
Version()
Out_Reg(CLEAR)
Ins_Text(@10)
Reg_Empty(10)

BOF
Reg_Copy_Block(10, Cur_Pos, EOL_Pos)
Buf_Quit(OK)

Buf_Switch(Buf_Free(EXTRA))
Ins_Text(VEDIT_EXE)

Search("|{VEDIT,VPW|[64]}.EXE",BEGIN)
if (Match("VEDIT.EXE")==0) {
Reg_Set(11,"VE16=")

If (Version_Num < 612) {
BOF
Ins_Text(@10)
Ins_Newline(1)
Reg_Empty(10)
Search("| if (Match("V")==0) {
Ins_Text("(DOS) ")
BOL
Reg_Copy_Block(10, Cur_Pos, EOL_Pos)
}
}
} else {
if (Match("VPW.EXE")==0) {
Reg_Set(11,"VE32=")
} else {
if (Match("VPW64.EXE")==0) {
Reg_Set(11,"VE64=")
}
}
}

Buf_Quit(OK)


// check for VEDIT.INI in user area assume home if not found

if (File_Exist("|(USER_CFG)\VEDIT.INI")) {
Reg_Set(12, USER_CFG)
} else {
Reg_Set(12, HOME)
}

Reg_Set(12, "\VEDIT.INI", APPEND)

File_Open("|@(12)", BROWSE)
Search("| if (Match("|D|D|D|D|D")==0) {
Reg_Copy_Block(13, Cur_Pos, EOL_Pos)
} else {
Reg_Set(13, "NONE")
}

File_Quit(OK)


Buf_Switch(#10)
BOF
Search("| if (Match("|D|D|D|D|D")==0) {
Ins_Text(@13,OVERWRITE)
} else {
Ins_Text(@13)
}

Search("|<|@(11)", ADVANCE)
if (Match("VEDIT")==0) {
Ins_Text(@10,OVERWRITE)
} else {
Ins_Text(@10)
}

#11=Config(F_BACKUP_MODE, 0)// save existing value then turn off
File_Save_As("VED-VER.INI", NOMSG+OK)
Config(F_BACKUP_MODE, #10)// restore original value
----------------8<----------------------

 


Topic: Re: VED-VER - Version output for external use (2 of 14), Read 14 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, May 04, 2004 03:08 PM

John:

On Tue, 04 May 2004 00:10:00 -0400, you wrote:


>// VED-VER.VDM Date: 04-29-2004 Time: 23:15:15
>// Date: 05/04/04 DOS version 6.12.1 now includes (DOS)
>// in version text
>[...]
>Buf_Switch(Buf_Free(EXTRA))
>Ins_Text(VEDIT_EXE)
>
>Search("|{VEDIT,VPW|[64]}.EXE",BEGIN)
>if (Match("VEDIT.EXE")==0) {


I wouldn't try to fiddle with the name(s) of the executables.
My Vedit application is names Arnold.exe (just a joke!) and so the
macro would fail.

That is one reason why I suggested the commands

Is_Windows
Is_WinNT
Is_Win32_Version

in the message from 30.04.2004.
Additionally there is the new command

Is_VEDIT_Pro64

In combination these comands should give you all infos about the VEDIT
version and bitness.


Later in the macro:

>File_Open("|@(12)", BROWSE)
>Search("| >if (Match("|D|D|D|D|D")==0) {
> Reg_Copy_Block(13, Cur_Pos, EOL_Pos)
>} else {
> Reg_Set(13, "NONE")
>}
>
>File_Quit(OK)

That File_Quit() leaves the used buffer opened.
I assume that is not your intention.

A Buf_Quit(OK) may be better here.


Christian

 


Topic: VED-VER - Version output for external use (3 of 14), Read 17 times
Conf: VEDIT Macro Library
From: John H
Date: Tuesday, May 04, 2004 03:57 PM

On Tue, 4 May 2004 15:09:18 -0400 GMT, Christian Ziemski wrote:

> I wouldn't try to fiddle with the name(s) of the executables.
> My Vedit application is names Arnold.exe (just a joke!) and so the
> macro would fail.

I had thought about that. EG: renaming to notepad.exe ..problem is
the way that I ultimately invoke the macro, once for each .exe I
also rely on the stock filenames so worrying about it in the macro
was moot. I use a batch file to run each version of vedit.. Kind of
a 6 or 1/2 dozen situation for me. I agree though, for general
consumption as a stand alone macro it would be best to account for
alternative executable names.

> That is one reason why I suggested the commands

Ah, I was looking at their use from a different perspective.

> That File_Quit() leaves the used buffer opened.
> I assume that is not your intention.

> A Buf_Quit(OK) may be better here.

That is correct. I wasn't trying to keep the buffer open for any
specific reason. Buf_Quit would more closely reflect my intention.

Thanks for the help Christian. I will implement the Is_xxx approach
to the macro for selecting the proper INI Keys. Seems like a decent
thing to do. I can re-write the plug-in to allow .exe variations and
loosen up the batch file too.

This was pretty much a task specific macro experiment for me. I'd
really looked at it with a 'quick and dirty' posture.

--
John

 


Topic: Re: VED-VER - Version output for external use (4 of 14), Read 21 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, May 04, 2004 05:05 PM

On Tue, 04 May 2004 15:57:00 -0400, John H wrote:

>This was pretty much a task specific macro experiment for me. I'd
>really looked at it with a 'quick and dirty' posture.

Yes, o.k. ;-)

But since you noted in a message 2 weeks ago that you are writing your
first VEDIT macro I couldn't resist to make some more remarks to make
you familiar with VEDIT.

You may have seen that there are only relatively few active users here
at WebBoard.
And so it's fine to see a new one; and he's a programming one too! ;-)

Christian

 


Topic: VED-VER - Version output for external use (6 of 14), Read 16 times
Conf: VEDIT Macro Library
From: John H
Date: Tuesday, May 04, 2004 10:26 PM

On Tue, 4 May 2004 17:06:25 -0400 GMT, Christian Ziemski wrote:

> On Tue, 04 May 2004 15:57:00 -0400, John H wrote:

>>This was pretty much a task specific macro experiment for me. I'd
>>really looked at it with a 'quick and dirty' posture.

> Yes, o.k. ;-)

> But since you noted in a message 2 weeks ago that you are writing your
> first VEDIT macro I couldn't resist to make some more remarks to make
> you familiar with VEDIT.

By all means! I certainly appreciate that. I've thought about
printing the manual but it's very long. Although the online help and
the PDF are very helpful I do still prefer books for reference. I
admit to skipping around in the help file/PDF. :-) I tend to zero
in on a command that seems to be right for the job, then put on the
blinders.

> You may have seen that there are only relatively few active users here
> at WebBoard.
> And so it's fine to see a new one; and he's a programming one too! ;-)

Yes, I guessed there is a whole slew of people who use vedit who
don't have the time or desire to get caught up in a discussion
group.

Basically I'm a hack programmer. Began with machine code in the mid
seventies, then some Z-80 assembler and BASIC. Later pretty much
Clipper then C/C++. Most of what I have been doing for a last few
months has been in Delphi 6, and the very fist bit of windows
programming I have ever tried.

I'm a hold out pretty much. Looked at GUI/Windows tools like Interdev
and just was all the time thinking YUK, I do not like green eggs and
ham. ;-)

Finally peaked my interest enough though to fiddle with the Win32
API.. heh, now that it's apparently becoming a dinosaur. Anyhow I
program for fun mostly. Well, do most everything for fun for that
matter..

I sat the fence for a while, contemplating the cost of VEDIT. I
really like UltraEdit, seems like a fine program. Not enough to
fiddle with or customize for my liking, and despite the lack of
modern spell checking I got kind of hooked by Vedit. I felt
comfortable in the notion that it wouldn't all of a sudden turn into
something puffy like XP or all of a sudden no longer work with my
old Windows 95 or 98 partitions.

Well, enough rambling. I came up with a new goal for a macro and
hope to get started on it this evening.

--
John

 


Topic: Re: VED-VER - Version output for external use (7 of 14), Read 17 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Wednesday, May 05, 2004 12:18 AM

At 10:27 PM 5/4/2004, you wrote:
>By all means! I certainly appreciate that. I've thought about
>printing the manual but it's very long. Although the online help and
>the PDF are very helpful I do still prefer books for reference. I
>admit to skipping around in the help file/PDF. :-) I tend to zero
>in on a command that seems to be right for the job, then put on the
>blinders.

You may want to purchase the 750+ page printed manuals. They are $20 plus shipping.

>Basically I'm a hack programmer. Began with machine code in the mid
>seventies,

Good man!! Me too.

>then some Z-80 assembler

Good man! Me too.

> and BASIC.

Hmm?

>Later pretty much
>Clipper then C/C++. Most of what I have been doing for a last few
>months has been in Delphi 6, and the very fist bit of windows
>programming I have ever tried.

VEDIT calls many Windows APIs from assembly language. :-)

>Well, enough rambling. I came up with a new goal for a macro and
>hope to get started on it this evening.

We look forward to seeing you next macro.

Ted.

 


Topic: VED-VER - Version output for external use (9 of 14), Read 19 times
Conf: VEDIT Macro Library
From: John H
Date: Wednesday, May 05, 2004 01:57 AM

On Wed, 5 May 2004 00:18:48 -0400 GMT, Ted Green wrote:

> You may want to purchase the 750+ page printed manuals. They are $20 plus shipping.

Perhaps. If they're in ring/notebook binders with type ~12 pt that
would be tempting.

>> and BASIC.

> Hmm?

heh heh, well peek and poke were a plus. BASIC did quite well for
some things. I dabbled in various other too. Very briefly used Turbo
Basic, did some Fourth and a little Lisp. Others I can't even recall
anymore.

>>Later pretty much
>>Clipper then C/C++. Most of what I have been doing for a last few
>>months has been in Delphi 6, and the very fist bit of windows
>>programming I have ever tried.

> VEDIT calls many Windows APIs from assembly language. :-)

I haven't done a lick of ASM since around 1985 when I finally
retired the zilog machines. Windows wasn't well received by me. I
broke down and got windows ~when Corel Draw 2.0 came out. I needed
some decent DTP software and Aldus and Corel was hard to beat,
without going to an Apple product.

> We look forward to seeing you next macro.

Me too! :-)

--
John

 


Topic: VED-VER - Version output for external use (11 of 14), Read 19 times
Conf: VEDIT Macro Library
From: Pauli Lindgren
Date: Wednesday, May 05, 2004 08:44 AM

On 5/5/2004 1:57:56 AM, John H wrote:
>
>heh heh, well peek and poke were a plus.
>BASIC did quite well for
>some things. I dabbled in various other
>too. Very briefly used Turbo
>Basic, did some Fourth and a little
>Lisp. Others I can't even recall
>anymore.

Check the freeware Basic compiler RapidQ:
http://www.basicguru.com/rapidq/

It is probably the easiest way to do Windows programs. The graphical GUI designer is quite limited, but the language itself gives very easy way to define Windows objects. But you can still write programs as you did with old Basic compilers if you wish.
Too bad RapidQ development has stopped.

I am currently doing a hobby project with RapidQ (a file format conversion program for Terragen). While on it, I have been updating my Vedit RapidQ support files, too. (I will update my web page in the near future.)

--
Pauli

 


Topic: VED-VER - Version output for external use (13 of 14), Read 19 times
Conf: VEDIT Macro Library
From: John H
Date: Wednesday, May 05, 2004 12:16 PM

On Wed, 5 May 2004 08:44:52 -0400 GMT, Pauli Lindgren wrote:

> Check the freeware Basic compiler RapidQ:
> http://www.basicguru.com/rapidq/

> It is probably the easiest way to do Windows programs. The
> graphical GUI designer is quite limited, but the language itself
> gives very easy way to define Windows objects. But you can still
> write programs as you did with old Basic compilers if you wish.
> Too bad RapidQ development has stopped.

> I am currently doing a hobby project with RapidQ (a file format
> conversion program for Terragen). While on it, I have been
> updating my Vedit RapidQ support files, too. (I will update my web
> page in the near future.)

Thanks! RapidQ looks interesting. Don't think I've looked at it
before. PowerBasic (www.powerbasic.com) looks quite interesting
also.

Terragen is quite cool, somehow I was directed to it a couple
years ago or so during a project.

--
John

 


Topic: VED-VER - Version output for external use (14 of 14), Read 15 times
Conf: VEDIT Macro Library
From: Pauli Lindgren
Date: Monday, May 31, 2004 10:17 AM

On 5/5/2004 8:44:33 AM, Pauli Lindgren wrote:
>
>I am currently doing a hobby project
>with RapidQ (a file format conversion
>program for Terragen). While on it, I
>have been updating my Vedit RapidQ
>support files, too. (I will update my
>web page in the near future.)

Update:
The program I was doing with RapidQ is now ready (V1.0 anyway). You can download it at:
http://koti.mbnet.fi/pkl/tg/TerraConv.htm

I have now updated the Vedit RapidQ support files at my web page:
http://koti.mbnet.fi/pkl/vedit/basic.htm

I added compiler support files, and did several enhancements and fixes on the macros. For example, the re-indent macro (Bas_ind.vdm) now supports ELSEIF, and I added configuration option on how to indent CASE lines. It has a new (third) option to indent CASE line for half indent step. Perhaps I'll add this feature later to the C indent macros, too.

--
Pauli

 


Topic: Re: VED-VER - Version output for external use (8 of 14), Read 17 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Wednesday, May 05, 2004 12:21 AM


>Yes, I guessed there is a whole slew of people who use vedit who
>don't have the time or desire to get caught up in a discussion
>group.

True. Only about 1% of users have ever logged in; even fewer check it regularly. :-((

We plan on implementing a new conference (tentatively with PHP-BBS) and forcing users to access it for routine support and updates.

Ted.

 


Topic: VED-VER - Version output for external use (10 of 14), Read 19 times
Conf: VEDIT Macro Library
From: John H
Date: Wednesday, May 05, 2004 01:58 AM

On Wed, 5 May 2004 00:21:59 -0400 GMT, Ted Green wrote:

> We plan on implementing a new conference (tentatively with
> PHP-BBS) and forcing users to access it for routine support and
> updates.

I hope there is mail list capability with that. I realize web based
message groups have their place, but it's so much more pleasant to
be able use an email client.

--
John

 


Topic: Re: VED-VER - Version output for external use (12 of 14), Read 17 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Wednesday, May 05, 2004 10:36 AM

At 01:58 AM 5/5/2004, you wrote:
>> We plan on implementing a new conference (tentatively with
>> PHP-BBS) and forcing users to access it for routine support and
>> updates.
>
>I hope there is mail list capability with that. I realize web based
>message groups have their place, but it's so much more pleasant to
>be able use an email client.

Yes, that is holding things up a bit. There is a preliminary "add-on" for PHP-BBS that adds mail list capability, but it will probably take some extra work to get it running.

Ted.

 


Topic: VED-VER - Version output for external use (5 of 14), Read 17 times
Conf: VEDIT Macro Library
From: John H
Date: Tuesday, May 04, 2004 05:30 PM

On Tue, 4 May 2004 15:09:18 -0400 GMT, Christian Ziemski wrote:

> In combination these comands should give you all infos about the VEDIT
> version and bitness.

Discarding support for older VEDIT versions I came up with this.
Much more simple no doubt.

Reg_Set(11,"VE")
if (Is_Win32_Version) {
if (Is_Vedit_Pro64) {
Reg_Set(11,"64", APPEND)
} else {
Reg_Set(11,"32", APPEND)
}
} else {
Reg_Set(11,"16", APPEND)
}
Reg_Set(11,"=", APPEND)

--
John