Thank you both, Sven and Hélio,

I thought it might work, but I see that it should not be used in Gretl scripts. Surely the problem can be circumvented.

(In Windows "call" and "start", and in Linux "open" don't work from the Gretl shell either.)

Cheers

Ekkehart


On 04.12.2021 13:41, Hélio Guilherme wrote:
On Windows you may try to use the command "call" . It should open the associated program to the file extension. On macOS I believe it is "open".

On Saturday, December 4, 2021, Sven Schreiber <svetosch@gmx.net> wrote:
Am 04.12.2021 um 11:52 schrieb Ekkehart Schlicht:

Hi,

I am running Gretl 2021d for Windows. If I place a PDF file Test.pdf in
C:/temp,define the string

string command = "C:/temp/Test.pdf"and run the command

! "@command"

the PDF will correctly open, but it takes a long time.


I'm actually a little surprised that this works at all. I would expect
that s shell command should typically invoke or specify some program, in
this case a pdf viewer. I'm guessing that in your case (where just a
file path is given) the OS looks for some default application for the
.pdf extension. Why it doesn't do that in the "launch" case I don't
know, but in any case I'd say this usage is not directly supported and
is just a matter of luck.

Maybe there is some magic or clever way to obtain the name of the
default pdf viewer on the current system and then use that in the shell
command.

cheers
sven
_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/

_______________________________________________
Gretl-users mailing list -- gretl-users@gretlml.univpm.it
To unsubscribe send an email to gretl-users-leave@gretlml.univpm.it
Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
-- 
Ekkehart Schlicht
Hurtenstr. 13
82345 Andechs-Frieding
Tel: +49 (0)8152 9149271