Chip,
First of all, let me point out that I can claim no credit for VoiceCode;
it was written by Alain Desilets <alain@@ai.iit.nrc.ca>.
My two technical contributions to this community have been the recent
"voiceController" program, as well as some enhancements to "a2x".
Surprisingly, both come into play in this discussion.
My enhancements to a2x included the ability to track windows, and create
a corresponding "SetHomeGroup" command to be executed explicitly via
a voice command such as "[reset input]". Since a2x is an X application,
it has knowledge of "window class" information, which is potentially a
helpful addition. A Windows application such as voiceController can have
no knowledge of this class information, and must rely solely upon window
titles.
My point is, that until I developed voiceController, a colleague of mine
and I were using a2x under eXceed (!) in the following unusual way:
gold> more ~/bin/a2x4pc
#!/bin/sh
DISPLAY=jaepc:0; export DISPLAY
a2x -t $HOME/ddwin/a2xtrackingcontrol </dev/null >/dev/null &
As you can see, we were only using a2x for its tracking capabilities, and
were completely disregarding any standard input; processing of standard
input is the normal role of a2x.
I am attaching an additional script and some sample data files suitable
for preparing the above "a2xtrackingcontrol" file. Note that for your
application, you will need to use a "P" command rather than the "p" commands
which appear in my samples. This "P" will need to be followed by the
appropriate class information for Mathematica.
I don't know whether this tricky use of a2x can co-exist with voiceController.
It's possible, but I haven't thought it through all the way.
Note that you will also require Network File Access (e.g., NFS) from your
PC to your Unix system, since your "[reset input]" command will need to
access the tracking file (resetinp.txt in this example) which contains
the necessary SetHomeGroup command.
Sorry that this is all so complicated, but I want to lay it out for posterity,
since I no longer use a2x myself, and don't want this information to be lost.
Feel free to give me a call if you're at all confused.
- Jonathan
Jonathan Epstein epstein@@ncbi.nlm.nih.gov
National Center for Biotechnology Information *NEW* Phone: (301)435-5756
National Library of Medicine Building 38A, Room 8N805
National Institutes of Health 8600 Rockville Pike
Bethesda, MD 20894
> From owner-voice-users@@shell.flinet.com Thu Jan 8 03:46:47 1998
> X-Authentication-Warning: morocco.cco.caltech.edu: sumner owned process doing
-bs
> Date: Thu, 8 Jan 1998 00:05:35 -0800 (PST)
> From: "Matthew C. Sumner" <sumner@@cco.caltech.edu>
> X-Sender: sumner@@morocco
> To: Jonathan Epstein <epstein@@gold.nlm.nih.gov>
> cc: voice-users@@voicerecognition.com
> Subject: Re: Mathematica and Exceed
> MIME-Version: 1.0
>
> Jonathan,
> Thanks for the advice. I do use some of the macros from previous
> version of VoiceCode, and I find them _extremely_ useful. In fact, I
> might have given up on programming by voice if I hadn't found them.
> Thanks for providing this valuable service!
> At the moment, however, both your mehtods and mine require that
> the window title have some fixed string that is unique to Mathematica
> windows. Unfortunately, mathematica does not provide such a string, and I
> haven't been able to find any sort of X-resource that controls such
> things. I was hoping that someone might have encountered this problem
> before. Alternately, I was hoping that someone might have a way to
> SetHomeGroup that doesn't require a certain string in the window title.
> -Chip
>
>
> On Wed, 7 Jan 1998, Jonathan Epstein wrote:
>
> > Hi, Chip,
> >
> > My voiceController program should be able to handle this for you, and there
> > should generally be no further need to manually use the SetHomeGroup
command.
> > See
> > http://www.out-loud.com/controller/index.html
> >
> > You will still need to be able to specify some sort of pattern for
> > the Mathematica windows; e.g., hopefully they all contain a common string.
> >
> > - Jonathan
> >
> > Jonathan Epstein epstein@@ncbi.nlm.nih.gov
> > National Center for Biotechnology Information *NEW* Phone: (301)435-5756
> > National Library of Medicine Building 38A, Room 8N805
> > National Institutes of Health 8600 Rockville Pike
> > Bethesda, MD 20894
> >
> >
> > > From owner-voice-users@@shell.flinet.com Wed Jan 7 15:55:13 1998
> > > X-Authentication-Warning: morocco.cco.caltech.edu: sumner owned process
doing
> > -bs
> > > Date: Wed, 7 Jan 1998 12:20:46 -0800 (PST)
> > > From: "Matthew C. Sumner" <sumner@@cco.caltech.edu>
> > > X-Sender: sumner@@morocco
> > > To: Voice Users List <voice-users@@voicerecognition.com>
> > > Subject: Mathematica and Exceed
> > > MIME-Version: 1.0
> > >
> > > I do most of my work on a UNIX platform and use Exceed to display
> > > the results on my PC. I have found it fairy efficient to have a different
> > > vocabulary group for each application that I run (i.e. xterm, emacs,
> > > Netscape, etc.). However, DD sees all of my X-windows as Exceed windows;
> > > therefore, I need to use SetHomeGroup commands to identify which
> > > vocabulary should be used with each window. To make this work, I need to
> > > be able to give each application a unique and constant window title. This
> > > presents a problem in some applications that only put the name of a
> > > document that you are editing in the window title (such as emacs). In
> > > most cases, I have been able to override this behavior; however,
> > > Mathematica insists on using the notebook name as the window title. Does
> > > anyone know how to change this?
> > > -Chip
> > >
> >
-------------------------------------------------------------------------------
> > > Chip Sumner
> > > sumner@@cco.caltech.edu
> > >
> >
-------------------------------------------------------------------------------
> > >
> >
>
>
-------------------------------------------------------------------------------
> Chip Sumner
> sumner@@cco.caltech.edu
>
-------------------------------------------------------------------------------
>
--2449_4117-1f2c_5235-244e_736
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Content-MD5: PwqD0DuLgGQGUDkCoKM8mA==
Content-Description: PrepareA2xInput
X-Sun-Data-Type: shell-script
#!/bin/sh
#
# If the optional first parameter is "a2x", then the output is suitable
# for an a2x user; otherwise, it is suitable for an EXCEED user
basedir=3D$HOME/ddwin
frequency=3D1
truncdelay=3D9999999
controlfile=3D$basedir/a2xtrackingcontrol
# file to be read by a DragonDictate macro (this should probably follow
# the old DOS 8.3 filename conventions for greater compatability with =
NFS
# packages)
ddfile=3D$basedir/resetinp.txt
windownamespec=3D$basedir/windowspec
groupnamespec=3D$basedir/groupspec
tempsedscript=3D/tmp/sedscr.$$
sethomegroupappname=3DEXCEED
sethomegroupvocname=3DEXCEED
flags=3D3
#
#
#
cat >$tempsedscript <<EOF
s/[ {}]//g
s/IF\(.\)/=14 i\1C/g
s/THEN\(.\)/=14=14 t\1=14/g
s/ELSE\(.\)/=14 l\1=14/g
s/END\(.\)/=14 n\1=14/g
EOF
#
#
#
sethomegroupgroupname=3D`sed -f $tempsedscript <$groupnamespec | tr -d =
"\012"`
if [ "x$1" =3D xa2x ]
then
ddfile=3D$basedir/periodic.txt
sethomegroupappname=3DHtelnet
sethomegroupwindowname=3DTelnet
sethomegroupvocname=3DHtelnet
flags=3D1
else
sethomegroupwindowname=3D`sed -f $tempsedscript <$windownamespec | =
tr -d "\012"`
fi
rm -f $tempsedscript
quote=3D'"'
#
# Write the actual control file
#
cat >$controlfile <<EOF
file=3D$ddfile
frequency=3D$frequency
prefix=3D$prefix
truncdelay=3D$truncdelay
string=3DSetHomeGroup =
$quote$sethomegroupappname$quote,$quote$sethomegroupwindowname$quote,$quo=
te$sethomegroupgroupname$quote,$quote$sethomegroupvocname$quote,$flags
EOF
--2449_4117-1f2c_5235-244e_736
Content-Type: application/octet-stream
Content-Transfer-Encoding: 7bit
Content-MD5: l02HXxTp2C5s2kHhpv9RPg==
Content-Description: groupspec
IF0 pcommander THEN0 {
commander
} ELSE0 {
IF1 p/var THEN1 {
dtmail
} ELSE1 {
IF2 pRe: THEN2 {
dtmail
} ELSE2 {
IF3 pentrez THEN3 {
entrez
} ELSE3 {
IF4 psubtool THEN4 {
subtool
} ELSE4 {
IF5 psequin THEN5 {
sequin
} ELSE5 {
IF6 pxterm THEN6 {
xterm
} ELSE6 {
IF7 pNew THEN7 {
dtmail
} ELSE7 {
xterm
} END7
} END6
} END5
} END4
} END3
} END2
} END1
} END0
--2449_4117-1f2c_5235-244e_736
Content-Type: application/octet-stream
Content-Transfer-Encoding: 7bit
Content-MD5: wz4hBAhC8biA6LWyg8fiRg==
Content-Description: windowspec
IF0 pcommander THEN0 {
commander
} ELSE0 {
IF1 p/var THEN1 {
/var
} ELSE1 {
IF2 pRe: THEN2 {
Re:
} ELSE2 {
IF3 pentrez THEN3 {
entrez
} ELSE3 {
IF4 psubtool THEN4 {
subtool
} ELSE4 {
IF5 psequin THEN5 {
sequin
} ELSE5 {
IF6 pxterm THEN6 {
xterm
} ELSE6 {
IF7 pNew THEN7 {
New
} ELSE7 {
xterm
} END7
} END6
} END5
} END4
} END3
} END2
} END1
} END0
--2449_4117-1f2c_5235-244e_736--
![]() |