Thanks Bill -
Changed line (in "else" section) to
-----
r=. ShellExecute 0;(uucp 'open');(uucp
PDFReader);(uucp ParamRES, dquote cmd);NULL;SW_SHOWNORMAL
-----
which did the job.
I'm not that familiar with ShellExecuteW as I
haven't done any Win API programming at all.
Q: What would be the best policy to not have
base.ijs and stdlib.ijs overwritten by the next
install 'all' call..? Make it Read-only..?
Martin
At 2014-04-01 16:34, you wrote:
untested but you may try something like this.
change in line (1) may not be needed. dquote in
(2) should be kept. (1) cmd=. '\' (I. cmd='/')
} cmd if. -.fexist cmd do. EMPTY return.
end. if. 0 = #PDFReader do. NB. checking for
empty string r=. ShellExecute 0;(uucp
'open');(uucp
cmd);NULL;NULL;SW_SHOWNORMAL else.
(2) r=. ShellExecute 0;(uucp 'open');(uucp
PDFReader);('-e ',uucp dquote
cmd);NULL;SW_SHOWNORMAL end. ÐÑ, 01 апÑ
2014, Martin Kreuzer пиÑал(а): > This is
how far I got: > > Found "viewpdf "definition in
stdlib.ijs alright. Relevant section is short >
of line 1900. > > Managed to get in local var
ParamRES=. ' -e ' . > > Changed this line >
----- > r=. ShellExecute 0;(uucp 'open');(uucp
PDFReader);(uucp dquote >
cmd);NULL;SW_SHOWNORMAL > ----- > to > ----- >
r=. ShellExecute 0;(uucp 'open');(uucp
PDFReader);(uucp ParamRES);(uucp > dquote
cmd);SW_SHOWNORMAL > ----- > so that the Windows
section now reads > > NB.
***************************************************************************************
> case. 'Win' do. > ShellExecute=. 'shell32
ShellExecuteW > i x *w *w *w *w
i'&cd > SW_SHOWNORMAL=. 1 > NULL=.
<0 > ParamRES=. ' -e ' NB. Parameter for
PDFReader (GSView): Reuse Existing > Session |
2014-04-01 > cmd=. '/' (I. cmd='\') }
cmd > if. -.fexist cmd do. EMPTY return.
end. > if. 0 = #PDFReader do. NB. checking
for empty string > r=. ShellExecute 0;(uucp
'open');(uucp
cmd);NULL;NULL;SW_SHOWNORMAL > else. >
sminfo PDFReader, ParamRES, dquote cmd NB.
2014-04-01 > r=. ShellExecute 0;(uucp
'open');(uucp PDFReader);(uucp ParamRES);(uucp >
dquote cmd);SW_SHOWNORMAL > end. > if. r<33
do. sminfo 'viewpdf error: ',PDFReader,'
',cmd,LF2,1{::cderx'' end. > NB.
***************************************************************************************
> > This is the jconsole output: >
----- > load 'plot' > plot 5 6 7 >
d:/program files/ghostgum/gsview/gsview32.exe -e
"f:/documents and > settings/admi >
n/j701-user/temp/plot.pdf" > ----- > which looks
fair enough to me ... > > The parameter is
passed along fine (resulting in GSview window no
1being > reused all the time); the pity is that
the target (the PDF file) doesn't > show anymore
:( > > I do know that is all very clumsy as my
programming skills are (very) limited. > >
Martin > > At 2014-04-01 10:02, you
wrote: > >default to ~temp/plot.pdf should be
correct. it calls this > > > >viewpdf_j_ jpath
'~temp/plot.pdf' > > > >typing in jconsole > >
viewpdf_j_ > >will give its definition and you
can see why it failed with a "-e" > >paramenter
because there is no such file with a
name > >"........ -e" > > > >you may modify
viewpdf_j_ until it work for you. > > > > > >On
Tue, Apr 1, 2014 at 5:41 PM, Martin Kreuzer
<[email protected]> wrote: > >> Chris, you are
right about that; I was able to confirm it using
XP's > >Virtual > >> DOS Console. > >> (Nice
time saving option, by the way.) > >> > >> That
still leaves the question: > >> Where is the
path-to-pdf-file filled in..? > >> > >> For plot
isn't following the ~temp path correctly > >>
----- > >> jpath '~temp' > >> f:/documents
and settings/admin/j701-user/temp > >>
----- > >> while the GSView -e parameter is
used, looking (in vain) for a file named > >>
"documents" in the root of f: > >> > >> From the
Help file
"/j701/addons/docs/help/jforc/graphics.htm" I
gathered > >> that > >> ----- > >> .... pd 'pdf
[filename width height]' creates a plot in PDF
format. > >> filename defaults to
~temp\plot.pdf, ..... > >> ----- > >> > >> Would
anybody know whether this is done within the
plot routine itself, or > >> in some cfg file
(other than base.cfg) ..? > >> > >>
Martin > >> > >> > >> At 2014-04-01 07:57, you
wrote: > >>> > >>> I think -e used to mean
"reuse any existing gsview
session". > >>> > >>> > >>> On Tue, Apr 1, 2014
at 3:37 PM, Martin Kreuzer
<[email protected]> > >>> wrote: > >>> > >>> >
Bill, you are right on both counts: > >>> > [1]
double quotes not necessary (single quotes
already taking care of > >>> > the > >>> >
blanks within path). > >>> > [2] "-e" obviously
causing the error; plot working like a charm
without > >>> > it. > >>> > Don't know anything
about this parameter; found it there in base.cfg
... > >>> > Thanks,
Martin > >>> > > >>> > > >>> > At 2014-04-01
07:22, you wrote: > >>> > > >>> >> I guess the
double quotes are not needed but it may be the
"-e" that > >>> >> caused error. What is this
"-e"? Can it be omitted? If not, try > >>> >>
another app such as acrobat
reader. > >>> >> > >>> >> On Tue, Apr 1, 2014 at
3:00 PM, Martin Kreuzer
<[email protected]> > >>> >> wrote: > >>> >> >
When adding a pair of double quotes I
get: > >>> >> > > >>> >> > ----- > >>> >> > ]
v=. 5 % ~ i: 5 > >>> >> > > >>> >> > _1 _0.8
_0.6 _0.4 _0.2 0 0.2 0.4 0.6 0.8
1 > >>> >> > load 'plot' > >>> >> > plot
v; v > >>> >> > view pdf error:"d:/program
files/ghostgum/gsview/gsview32.exe"
-e > >>> >> > f:/documents a > >>> >> > nd
settings/admin/j701-user/temp/plot.pdf > >>> >> >
> >>> >> > > >>> >> > The system cannot find
the file specified. > >>> >> >
----- > >>> >> > > >>> >> > which might be
alright for finding GSView but still leaves the
path > >>> >> > to > >>> >> > plot.pdf in a
somehow sorry state ... > >>> >> > I haven't yet
found where this parameter is filled
in. > >>> >> > > >>> >> >
Martin > >>> >> > > >>> >> > > >>> >> > At
2014-04-01 06:28, you
wrote: > >>> >> >> > >>> >> >> > It looks to me
as if there are quotes missing so that both
paths > >>> >> aren't > >>> >> >> interpreted
correctly. > >>> >> >> > >>> >> >> OK, what
happens when you put the paths in
quotes? > >>> >> >> > >>> >> >>
Chris > >>> >> >> > >>> >> >> > >>> >> >> On
Tue, Apr 1, 2014 at 2:18 PM, Martin Kreuzer
<[email protected]> > >>> >> >>
wrote: > >>> >> >> > >>> >> >> > Greetings
- > >>> >> >> > > >>> >> >> > Beg your pardon in
case I didn't search thorougly
enough. > >>> >> >> > > >>> >> >> > This is a
from a J7 installation on a WinXP
machine: > >>> >> >> > > >>> >> >> >
----- > >>> >> >> > ]v=. 5%~ i:
5 > >>> >> >> > _1 _0.8 _0.6 _0.4 _0.2 0 0.2 0.4
0.6 0.8 1 > >>> >> >> > load
'plot' > >>> >> >> > plot v; v > >>> >> >> >
view pdf error:d:/program
files/ghostgum/gsview/gsview32.exe
-e > >>> >> >> > f:/documents
and > >>> >> >> >
settings/admin/j701-user/temp/plot.pdf > >>> >> >
> > > >>> >> >> > The system cannot find the
file
specified. > >>> >> >> > > >>> >> >> > 9!:14
'' > >>> >> >> >
j701/2011-01-10/11:25 > >>> >> >> >
----- > >>> >> >> > > >>> >> >> > The executable
(gsview32.exe) is there; the graph (plot.pdf)
is > >>> >> there; > >>> >> >> > when opened
manually via GSView there's no problem at
all. > >>> >> >> > It looks to me as if there
are quotes missing so that both paths > >>> >>
aren't > >>> >> >> > interpreted
correctly. > >>> >> >> > However, these are the
relevant (?) lines from > >>> >>
/system/config/base.cfg: > >>> >> >> > > >>> >> >
> > ----- > >>> >> >> > EPSReader=:
'd:/program files/ghostgum/gsview/gsview32.exe
-e' > >>> >> >> > PDFReader=: 'd:/program
files/ghostgum/gsview/gsview32.exe
-e' > >>> >> >> >
----- > >>> >> >> > > >>> >> >> > Any hint
appreciated. > >>> >> >> > > >>> >> >> >
Martin > >>> >> >> > > >>> >> >> >
------------------------------------------------------------
> >>> >> ---------- > >>> >> >> > For
information about J forums see
http://www.jsoftware.com/ > >>> >>
forums.htm > >>> >> >> > > >>> >> >> > >>> >> >>
> >---------------------------------------------
------------------------- > >>> >> >> For
information about J forums see > >>> >> >>
http://www.jsoftware.com/forums.htm > >>> >> > >
>>> >> > > >>> >> > > >>> >> > > >--------------
--------------------------------------------------------
> >>> >> > For information about J forums
see > >>> >> >
http://www.jsoftware.com/forums.htm > >>> >>
----------------------------------------------------------------------
> >>> >> For information about J forums see
http://www.jsoftware.com/forums.htm > >>> >> > >>
> > > >>> >
----------------------------------------------------------------------
> >>> > For information about J forums see
http://www.jsoftware.com/forums.htm > >>> > > >>>
----------------------------------------------------------------------
----------------------------------------------------------------------
> >>> For information about J forums see
http://www.jsoftware.com/forums.htm > >> > >>
----------------------------------------------------------------------
> >> For information about J forums see
http://www.jsoftware.com/forums.htm > >----------
------------------------------------------------------------
> >For information about J forums see
http://www.jsoftware.com/forums.htm > >
----------------------------------------------------------------------
> For information about J forums see
http://www.jsoftware.com/forums.htm -- regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24 gpg
--keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export
4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm