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
How to build with MBF fra...
by
MiR
[
Today
at 04:16:12 pm]
Installation problems on ...
by
TristamShandy
[
Today
at 04:11:52 pm]
GTK2 is now EOL :(
by
af0815
[
Today
at 03:43:30 pm]
Differences between compi...
by
z0rr0
[
Today
at 03:25:47 pm]
Unit name problem
by
MarkMLl
[
Today
at 03:22:30 pm]
SigSeg in TQtWidget.GetWi...
by
cdbc
[
Today
at 03:11:19 pm]
Can BaseUnix works for Wi...
by
MarkMLl
[
Today
at 01:28:25 pm]
Windows API test programs...
by
440bx
[
Today
at 12:28:49 pm]
TLineSeries display every...
by
wp
[
Today
at 12:23:10 pm]
Problem with OnPaint auto...
by
circular
[
Today
at 12:19:59 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Need help with external process (Read 275 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: 9003
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