HP3000-L Archives

December 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Doug Werth <[log in to unmask]>
Reply To:
Doug Werth <[log in to unmask]>
Date:
Wed, 15 Dec 1999 08:43:01 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (90 lines)
Hi all.

Greg Chaplin asked me to forward this private reply to the list. (I can't
believe I just needed to add OPTION NOLIST. Sometimes it's the simple things
that 'byte' you.)

Doug.


----- Original Message -----
From: GREG CHAPLIN <[log in to unmask]>
To: Doug Werth <[log in to unmask]>
Sent: Tuesday, December 14, 1999 9:40 PM
Subject: Re: Host Access to Reflections VBA commands


> Doug Werth sent in a correction to his original script, stating that the
> commands must be echoed to a file & that file then printed to $stdlist.
> However, I tried the original in a command file which worked fine. I
enhanced
> it a bit, to the following:
>
> parm AppName="",ParmOrFName=""
> option nolist
> echo !'esc_'&oG
> echo sub main
> echo application.shell "!AppName","!ParmorFName"
> echo end sub
> echo !'esc_'&oH
>
> (Note that I've set the Escape character to the variable named "esc_").
>
> The above script works like a charm, WITHOUT the need to use an
> intermediate file.
>
> Thanks heaps, Doug - I had been trying to find a way of using the VB
> command instead of RCL commands, but had given up and used the RCL
> "SHELL" command instead. Using the VB approach should give me more
> power in the application (error checking, pause the host until completed,
etc).
>
> Doug's post was:
>
> > I wrote (incorrectly):
> > > >
> > >
> > > You can't execute just a single VBA command in Reflection as you would
> > > an RCL command. You must create an entire subroutine to do it. Here is
> > > an example:
> > >
> > > setvar esc,chr(27)
> > > echo !ESC&oG
> > > echo sub main
> > > echo application.shell "c:\windows\notepad"
> > > echo end sub
> > > echo !ESC&oH
> >
> > The above does not work. Everything that occurs between the beginning
and
> > ending escape sequence is treated as part of the VB script, including
the
> > ECHO commands, and ECHO is not a valid VBA command. The following
command
> > file really will work:
> >
> > parm AppName="c:\windows\notepad",ParmOrFName="c:\autoexec.bat"
> > setvar esc,chr(27)
> > echo !ESC&oG                                     > vbacmd
> > echo sub main                                    >> vbacmd
> > echo application.shell "!AppName","!ParmorFName" >> vbacmd
> > echo end sub                                     >> vbacmd
> > echo !ESC&oH                                     >> vbacmd
> > print vbacmd
> >
> > The same thing can also be accomplished from within any programming
> > language by displaying/printing the commands to $STDLIST.
> >
>
>
> ----------------------------------------------------------
> Greg Chaplin
> UniSuper
> Level 28, 367 Collins St,
> Melbourne  VIC  3000,
> Australia.
> Email: [log in to unmask]
> Phone: +61 3 9648 4145
> Fax:   +61 3 9648 4141
>

ATOM RSS1 RSS2