application.executeProgram

Questions, tips and tricks and techniques for scripting in Servoy

Re: application.executeProgram

Postby Gordon McLean » Tue Feb 02, 2016 6:32 pm

Robert did a better explanation but of the same thing

Code: Select all
// returns result!
application.output(application.executeProgram('/usr/bin/env'));

// no result, not even writing a file...
application.output(application.executeProgram('/bin/sh', ['/Users/robert/test.sh']));


The key points being
a) Servoy would not run the bash script direct - that would be ideal
b) I could not add the symlink into /usr/bin I had to first remove the block. I could have written the the bash into usr/bin but wanted to keep the client files separate.

I guess they (apple) are trying to prevents you writing some script into a folder and throwing a symlink into the bin to trigger system wide scripts remotely or something ...

Either way the fix worked and was handy
Gordon McLean
Clickdigital.com
Gordon McLean
 
Posts: 253
Joined: Wed Aug 03, 2005 12:24 pm
Location: UK

Previous

Return to Methods

Who is online

Users browsing this forum: No registered users and 9 guests