From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: How to call a Windows executable from Ada?
Date: Wed, 8 Dec 2021 23:09:55 -0600 [thread overview]
Message-ID: <sos334$akq$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]
It's hard to say anything definitive without seeing the code that you tried.
I haven't found a program that you couldn't run from Ada (using the
Janus/Ada facilities; GNAT's are more extensive so I wouldn't expect any
difference there), but some things require care. I've definitely never found
anything that you can't run by starting a command line processor; that
doesn't allow the real-time capture of the results by the calling program
but that wouldn't make sense with Winword.exe anyway.
Randy.
"Marius Amado-Alves" <amado.alves@gmail.com> wrote in message
news:71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com...
Any *effectively working* solution for calling an external Windows
executable, with arguments, from inside Ada?
For example, the following command runs fine when given on the Windows
command line:
"C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" /f "C:\long
path\with spaces\and accented letters\like in the words\declaração de
autorização.docx" /mSave_As_Txt
The same command FAILS when called from inside Ada with any of the know
"solutions" on GNAT gem [1] and Rosetta Code [2].
But there must be a way!
Share your good code.
Thanks.
[1] https://www.adacore.com/gems/gem-54
[2] https://rosettacode.org/wiki/Execute_a_system_command#Ada
next prev parent reply other threads:[~2021-12-09 5:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 23:04 How to call a Windows executable from Ada? Marius Amado-Alves
2021-12-09 5:09 ` Randy Brukardt [this message]
2021-12-09 7:26 ` Vadim Godunko
2021-12-09 7:29 ` Dmitry A. Kazakov
2021-12-09 9:28 ` Marius Amado-Alves
2021-12-09 18:38 ` Dennis Lee Bieber
2021-12-09 19:27 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox