- Home /
Question by
dansav · Sep 20, 2018 at 11:14 PM ·
processcommand lineterminal
Run terminal cmd on osx
I'm trying to run a terminal cmd in osx Here's the code I'm using:
public Process process;
process = new Process();
process.StartInfo.FileName = "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal";
process.StartInfo.UseShellExecute = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.Arguments = "screencapture screen.jpg";
process.Start();
It's supposed to take a screenshot of the entire desktop. The result is that a terminal opens but nothing happens -- no commands are typed into the terminal. I have used this with ffmpeg before and it worked fine as long as you state the path correctly.
Comment
Your answer
Follow this Question
Related Questions
Get notification from command line or other application when a printer finish printng? 1 Answer
Run Terminal Command using System.Diagnostics.Process not working on osx 2 Answers
Simultaneous Unity & Command Prompt? 0 Answers
Output to terminal / cli 0 Answers
Open Terminal window for OSX System.Diagnostics.Process 0 Answers