Support > General Discussions

Running an outside call?

(1/1)

Ken Arck:
Is there anyway to call a binary from within Scriba (Linux)?

Support:

--- Quote from: KenHorse on January 22, 2012, 11:22:16 AM ---Is there anyway to call a binary from within Scriba (Linux)?

--- End quote ---

Do you mean call an external library function in a shared object? (.so)

ScriptBasic has a nice extension module API that makes extending the language rather easy. The API is composed of macros that allows wrapping an external library with very few lines of code.

The Windows version of ScriptBasic has an extension module called DYC that will let you call generic DLLs. Under Linux I use GTK-Server as my FFI interface.


Ken Arck:
I mean lets say (as an example only) that I want to call a compiled binary in /usr/local/bin from within a Scriba program and then return to the Scriba program and continue onward

Support:
Ken,

When you say CALL, I assume you mean calling a function in a script or an external library. If you mean execute a system or external executable, (program) then ScriptBasic supports two methods.

EXECUTE - can wait for the external program to finish.

SYSTEM - start an external program in a separate process in asynchronous mode

John

Ken Arck:
Excellent, thank you!

(I was looking though the documentation searching for the wrong keywords!)

Navigation

[0] Message Index

Go to full version