Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AppmethodCode SnippetDelphiFiremonkeyOSX

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.

Related posts
AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

Sign up for our Newsletter and
stay informed

Leave a Reply