Topic: RUNSHELL.VDM edited for 64 bits. (1 of 10), Read 77 times, 1 File Attachment
Conf: Keyboard, keystroke macros
From: Peter Rejto
Date: Monday, May 10, 2010 11:38 PM

I have edited the RUNSHELL.VDM macro for my WIN XP 64 bit operating system.

I did this editing in the style of Christiona's OPENCURS.VDM.
There he says, in particular, that

"to avoid the DOS option.."

The specific reference is:
webboard.vedit.com/?5349,34


Since the Vedit {Misc, Run Program ..} menu command does use this macro I kept the original name. In fact, I moved the edited macro to my user macro directory.

Another macro that has to be edited for the 64 bit version is VEDITPDF.VDM. See the discussion in
webboard.vedit.com/?58866,31
In fact, there Pauli did this type of editing of that macro and much more.


I am uploading my macro.

 
Edited version of RUNSHEL.VDM for 64 bit

 


Topic: RUNSHELL.VDM edited for 64 bits. (2 of 10), Read 63 times
Conf: Keyboard, keystroke macros
From: Ian Binnie
Date: Wednesday, May 12, 2010 05:52 AM

This macro works (not that I use it often)

I still think the "cmd %comspec%" is strange.

This uses the default command interpreter, just to expand the environment variable - just in case someone is using a different command interpreter.

I know that I did actually suggest this in a discussion, but did not seriously expect anyone to implement it.

It probably doesn't hurt, but neither does it help much.
I understand why some use others use different command interpreters e.g. 4NT, but in this context it seems to offer little value.

If you really want to allow different command interpreters, it would be better to use getenv.

Even better would be for Vedit to do this (possibly using a shell call) rather than including in macros.

 


Topic: RUNSHELL.VDM edited for 64 bits. (3 of 10), Read 63 times
Conf: Keyboard, keystroke macros
From: Peter Rejto
Date: Wednesday, May 12, 2010 02:37 PM

On 5/12/2010 5:52:21 AM, Ian Binnie wrote:
>This macro works (not that I
>use it often)
>
>I still think the "cmd
>%comspec%" is strange.
>
>This uses the default command
>interpreter, just to expand
>the environment variable -
>just in case someone is using
>a different command
>interpreter.
>
>I know that I did actually
>suggest this in a discussion,
>but did not seriously expect
>anyone to implement it.
>
>It probably doesn't hurt, but
>neither does it help much.
>I understand why some use
>others use different command
>interpreters e.g. 4NT, but in
>this context it seems to offer
>little value.
>
>If you really want to allow
>different command
>interpreters, it would be
>better to use getenv.
>
>Even better would be for Vedit
>to do this (possibly using a
>shell call) rather than
>including in macros.


Ian,

Once again a big thank you for your suggestion!
It did allow me to use Vedit on my Win XP 64 bit system!
At the same time, I was glad to hear that it did work for you. (You never know what those gurus will come up with.)


After your suggestion I learned about Howard Goldstein's suggesion


"Or better yet, use the value of the COMSPEC environment variable rather than hard coding CMD.EXE. This way, those of us who prefer a different command processor wouldn't be forced into using CMD."

in the Extending OPENCURS.VDM conference.

So I do hope that Howard reads this email and will let us know how he handles the DOS shell issue.



Thanks to all,

-peter

 


Topic: RUNSHELL.VDM edited for 64 bits. (9 of 10), Read 39 times
Conf: Keyboard, keystroke macros
From: Pauli Lindgren
Date: Monday, May 17, 2010 04:40 AM

On 5/12/2010 2:37:47 PM, peter rejto wrote:
>
>After your suggestion I learned about
>Howard Goldstein's suggesion
>
>"Or better yet, use the value of the
>COMSPEC environment variable rather than
>hard coding CMD.EXE. This way, those of
>us who prefer a different command
>processor wouldn't be forced into using
>CMD."

I don't see any reason why anybody would want to use another command interpreter in the macro.

If the macro uses cmd.exe, it does not force YOU to use cmd.exe in your command mode window. You can use whatever command interpreter you like.

Using another command interpreter can not offer any benefit for the macro. But it may cause harm. If the other command interpreter is not 100% compatible with cmd.exe, the macro may NOT WORK!

--
Pauli

 


Topic: Re: RUNSHELL.VDM edited for 64 bits. (4 of 10), Read 65 times
Conf: Keyboard, keystroke macros
From: Christian Ziemski
Date: Wednesday, May 12, 2010 04:05 PM

On 11.05.2010 05:41 vtech-keystroke Listmanager wrote:
> From: "peter rejto":
>
> I have edited the RUNSHELL.VDM macro for my WIN XP 64 bit operating system.
>
> I did this editing in the style of Christiona's OPENCURS.VDM.
> There he says, in particular, that
>
> "to avoid the DOS option.."
>
> The specific reference is:
> webboard.vedit.com/?5349,34


Peter:

In opencurs.vdm I used it this way:
Reg_Set(106, "cmd /c ") // use cmd command to be able to avoid DOS option


In your runshell.vdm you wrote:
System(`cmd %comspec% /k |@(#65)`,#69)


As Ian wrote today: That is strange.

Perhaps you should try:
System(`%comspec% /k |@(#65)`,#69)

since %COMSPEC% evaluates to CMD.EXE or whatever command interpreter one
uses.
But I have to agree to Ian: That isn't needed here.


Christian


BTW:

Peter, I had to search some time to find out that you meant to
reference this article: http://webboard.vedit.com/read?53459,34 ...

 


Topic: Re: RUNSHELL.VDM edited for 64 bits. (5 of 10), Read 66 times
Conf: Keyboard, keystroke macros
From: Ian Binnie
Date: Wednesday, May 12, 2010 09:01 PM

On 5/12/2010 4:05:28 PM, Christian Ziemski wrote:

>Perhaps you should try:
> System(`%comspec% /k |@(#65)`,#69)
>
>since %COMSPEC% evaluates to CMD.EXE or
>whatever command interpreter one
>uses.

That wouldn't work.
You need a command interpreter to expand %COMSPEC%

I think a simple cmd would be best.
Anyone who needs to use another command interpreter could invoke it in the command line e.g. by including 4NT (or even %COMSPEC%)

This avoids the double shell for the 99.9% of us who use the standard command interpreter.

There is very little difference in command interpreters, unless you are writing complex scripts or using the interactive features.

If I really wanted to invoke a users command interpreter, I would check the environment variable first.

 


Topic: Re: RUNSHELL.VDM edited for 64 bits. (6 of 10), Read 62 times
Conf: Keyboard, keystroke macros
From: Christian Ziemski
Date: Thursday, May 13, 2010 02:28 AM

On 13.05.2010 03:01 vtech-keystroke Listmanager wrote:
> From: Ian Binnie
> On 5/12/2010 4:05:28 PM, Christian Ziemski wrote:
>
>>Perhaps you should try:
>> System(`%comspec% /k |@(#65)`,#69)
>>
>>since %COMSPEC% evaluates to CMD.EXE or
>>whatever command interpreter one uses.
>
> That wouldn't work.
> You need a command interpreter to expand %COMSPEC%


Since I'm using Linux instead of Windows as my main
Operating System for some time now,
I may have forgotten many details ...

... but I just tried

System("%comspec% /k dir", DOS)

and it worked as expected.


Christian

 


Topic: Re: RUNSHELL.VDM edited for 64 bits. (7 of 10), Read 67 times
Conf: Keyboard, keystroke macros
From: Peter Rejto
Date: Thursday, May 13, 2010 03:28 AM

On 5/13/2010 2:28:38 AM, Christian Ziemski wrote:
>On 13.05.2010 03:01 vtech-keystroke
>Listmanager wrote:
>> From: Ian Binnie
>> On 5/12/2010 4:05:28 PM, Christian Ziemski wrote:
>>
>>>Perhaps you should try:
>>> System(`%comspec% /k |@(#65)`,#69)
>>>
>>>since %COMSPEC% evaluates to CMD.EXE or
>>>whatever command interpreter one uses.
>>
>> That wouldn't work.
>> You need a command interpreter to expand %COMSPEC%
>
>
>Since I'm using Linux instead of Windows
>as my main
>Operating System for some time now,
>I may have forgotten many details ...
>
>... but I just tried
>
> System("%comspec% /k dir", DOS)
>
>and it worked as expected.
>
>
>Christian


Hi,

I just tried it on my Win XP 64 bit system and it did not work. I also eliminated the DOS option and this did not solve the problem either.


However, combining it with one of Ian's suggestions it works like a charm. Specifically, I tried,

Get_Environment(10, "COMSPEC") System("|@(10) /k dir")

and this, indeed, did work.



So, if I do not hear from Howard, I shall go ahead and revise my RUNSHELL.VDM using

System(`cmd /k |@(#65)`,#69)

In other words, I shall treat the DOS option exactly the way OPENCURS.VDM does.

Gentlemen, thanks again for making possible the use of VEDIT on my Win XP 64 bit system.


-peter

 


Topic: Re: RUNSHELL.VDM edited for 64 bits. (8 of 10), Read 80 times
Conf: Keyboard, keystroke macros
From: Christian Ziemski
Date: Thursday, May 13, 2010 04:01 AM

On 5/13/2010 2:28:38 AM, I wrote:
>
> System("%comspec% /k dir", DOS)
>
>and it worked as expected.

But needs to have the DOS option set, ooops.

Now I recall that the cmd.exe itself is the one making the DOS option obsolete.

So finally Ian's or Howard's/Peter's solution seems to be the correct one:

Using cmd.exe directly or via getenv("CPMSPEC") as mentioned in Peter's recent message.


Conclusion: I really should shut up regarding Windows issues these days. ;-)


Christian

 


Topic: Re: RUNSHELL.VDM edited for 64 bits. (10 of 10), Read 40 times
Conf: Keyboard, keystroke macros
From: Ted Green
Date: Tuesday, June 08, 2010 10:55 AM

I am correcting the System() command now to work with 64-bit Windows.
I will use the %comspec% environment variable and shell out with e.g. the /k or /c options, or no option.
That should handle the normal cmd.exe shell and most non-standard shells.

Ted.