Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Need help with external process
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
mac OS11 installation pro...
by
skalogryz
[
Today
at 03:36:58 am]
Multiple forms
by
rwebb616
[
Today
at 02:58:38 am]
Updating mainmenu items b...
by
torbente
[
Today
at 02:47:59 am]
Solved - Unable to set im...
by
Wilko500
[
Today
at 02:37:52 am]
Turtle Graphics
by
lainz
[
Today
at 02:15:08 am]
Unicodestring type and Ar...
by
Remy Lebeau
[
Today
at 01:49:02 am]
Standard Login dialog box
by
trev
[
Today
at 01:40:25 am]
[Solved] Regression for T...
by
Alextp
[January 22, 2021, 11:23:11 pm]
opendialog does not selec...
by
trev
[January 22, 2021, 11:14:17 pm]
String consts from HTML o...
by
lucamar
[January 22, 2021, 11:11:33 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Need help with external process (Read 291 times)
nikel
Full Member
Posts: 123
Need help with external process
«
on:
October 29, 2020, 11:06:39 am »
Hello, I'm trying to run a program in command line on Windows. This works fine:
Code: Pascal
[Select]
[+]
[-]
if
RunCommand
(
'ffprobe'
,
[
'-loglevel error -show_entries format_tags='
+
Request
+
' -of default=noprint_wrappers=1:nokey=1 '
+
'"'
+
Path
+
'"'
]
,
Str
)
then
begin
But this doesn't set any value:
Code: Pascal
[Select]
[+]
[-]
if
RunCommand
(
'ffprobe'
,
[
'"'
+
Path
+
'"'
]
,
Str
)
then
begin
How can I execute an external command and get the output on Windows?
«
Last Edit: October 29, 2020, 11:08:43 am by nikel
»
Logged
marcov
Global Moderator
Hero Member
Posts: 9020
FPC developer.
Re: Need help with external process
«
Reply #1 on:
October 29, 2020, 11:53:31 am »
- No quoting
- pass multiple parameters as a list
so
RunCommand('ffprobe',['-loglevel','error','-show_entries format',.....
etc
Logged
nikel
Full Member
Posts: 123
Re: Need help with external process
«
Reply #2 on:
October 29, 2020, 04:59:49 pm »
Thanks for the reply.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Need help with external process
TinyPortal
© 2005-2018