If already exists a program that it does what you want, you avoid a lot of work using it.
For example you may write in rebol a GUI for a command line program to see a video:
call "vlc --no-osd myvideo.avi"
Sometime you don't need to launch a big external program, you just need some feature of the external program, so probably you want to use a library. A library is like an external software, but very tiny and for just some purpose. Using a library it's quickly than a normal external software. An external library on windows usually ends with .dll extension, on Linux with .so. The following guide will use a windows DLL, but it's totally the same on Linux and Mac.
First of all you have to load the library and giving it a name, for example "lib":
lib: load/library %libwmp3.dll
now lib is a rebol library and you can interact with it using the routine!. A Library expects a command, that is case sensitive, and returns a status or an error. Let's see an example:
Mp3_SetVolume: make routine! [
] lib "Mp3_SetVolume"
The Mp3_SetVolume routine can now be used to set sound volume, you may use it this way:
Mp3_SetVolume myinitialized 100 100
as you see we launch the routine with all parameters declared: initialized resource, left volume, right volume. It returns 0 or 1 if all went ok or not.
You have to read library documentation to know which routines are available and what parameters they want.
Now I implemented a MP3 player using a Nick Antonaccio script, turn up the volume to listen it well:
here is the source: