Read And Interact With A Command Line Pipe In Delphi XE7 Firemonkey On Mac OSX

Delphi XE7 Firemonkey Mac OSX Command Line Pipe Example CodeDeveloper Michael L. on the Embarcadero forums has posted up some sample code for executing an app on Mac OSX and interacting with the result in Delphi XE7 Firemonkey. Developer Sebastian Z. also provides a useful function called ExecAndWait() for executing an app, waiting for it to complete, and then reading the result. The goal of Michael’s code was to be able to launch an app on Mac OSX, read in the result, and control the app by sending it response data. The final code in the thread does just that. The code uses both TNSTask and TNSPipe. You can read more about the NSTask object in the Apple documention. You can also read more about the NSPipe object as well in the docs. The TNSPipe object exposes writeData() and availableData() for writing and reading data from a pipe. This code should work for Appmethod as well. Obviously the code is for Mac OSX only and does not support Android, IOS, or Winows. Check out a snippet of the source code below:

Head over and check out the full code snippet for reading and writing from and to a command line pipe on Mac OSX in Delphi XE7 Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

One Response to Read And Interact With A Command Line Pipe In Delphi XE7 Firemonkey On Mac OSX

  1. Pingback: Новости из мира Delphi 22.12.2014 – 25.01.2015 | Delphi 2010 ru

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Handle The Hardware Back And Menu Buttons In Delphi XE7 Firemonkey On Android

Developer Adriano Santos from Brazil has a blog post up with a tutorial for handling the hardware buttons available on...