richmondmathewson at gmail.com
Mon Mar 23 15:19:23 EDT 2015
On 23/03/15 12:30, Peter TB Brett wrote:
> On 2015-03-22 22:59, Peter W A Wood wrote:
>> I believe that Richard’s “providing OS API access” is a
>> simplification, probably an over simplification, of “providing the
>> ability to access the OS API”. As I understand, LiveCode Builder will
>> allow us to write code which can directly call an OS API but, of
>> course, we will need to define the OS API function in LiveCode
>> I had a quick scan of the LiveCode Builder files in Github but didn’t
>> see any examples so the facility may not even be in the current
>> release .
> It's in there.
Obviously there is a socking great hole in my education as I cannot for
the life of me
see how I can use that information:
"foreign handler __system(in Command as ZStringNative) returns CInt
binds to "system"
handler Shell(in pCommand as String) returns Number
variable tExitStatus as Number
put __system(pCommand) into tExitStatus
if tExitStatus is in [0, -1] then
if the operating system is "linux" then
-- Basically the WEXITSTATUS macro from C...
return tExitStatus shifted right by 8 bitwise
to hook onto an API . . .
More information about the Use-livecode