C (6/254)

From:Colin Wenzel
Date:19 Apr 00 at 03:18:53
Subject:Re: implementing cut scenes

On 19-Apr-00, Steven Dobbs wrote:
-snip-
> my main problem is that though I'm okay at 3d maths and handy with c,
> I do not know how to do very much that is amiga specific. So far I'm
> stretching my abilities to add joystick control - all my amiga
> specific functionality is borrowed code off others. But I remember
> once I managed to do something in blitz using an OS function call.
> its info in my blitz manual (I dont have proper amiga docs) is
>
> Execute(string,file1,file2) , what c types would these be? char *,
> char * , char * ???
>
> I cant seem to do anything with this dos function in c. I imagined it
> would be possible to execute an mpeg or avi player perhaps that I
> could download from the internet so quickening up the project as a
> whole, as I could then concentrate on creating cut scenes rather than
> figuring out stuff that I dont actually know.
>

You NEED the autodocs...........
Get the developer CD from H&P.... (Look below)

-------------------------------------
Colin Wenzel. Australia.

EMAIL: mailto:colstv@hotkey.net.au
URL: http://www.hotkey.net.au/~colstv/
ICQ: 17608330
AMIGA: 4000T, 68060/50, 150Mb RAM,
OS 3.5, EGS Spectrum.
---------------------------------------

NAME
Execute -- Execute a CLI command

SYNOPSIS
success = Execute( commandString, input, output )
D0 D1 D2 D3

BOOL Execute(STRPTR, BPTR, BPTR)

FUNCTION
This function attempts to execute the string commandString as a
Shell command and arguments. The string can contain any valid input
that you could type directly in a Shell, including input and output
redirection using < and >. Note that Execute() doesn't return until
the command(s) in commandstring have returned.

The input file handle will normally be zero, and in this case
Execute() will perform whatever was requested in the commandString
and then return. If the input file handle is nonzero then after the
(possibly empty) commandString is performed subsequent input is read
from the specified input file handle until end of that file is
reached.

In most cases the output file handle must be provided, and is used
by the Shell commands as their output stream unless output
redirection was specified. If the output file handle is set to zero
then the current window, normally specified as *, is used. Note
that programs running under the Workbench do not normally have a
current window.

Execute() may also be used to create a new interactive Shell process
just like those created with the NewShell command. In order to do
this you would call Execute() with an empty commandString, and pass
a file handle relating to a new window as the input file handle.
The output file handle would be set to zero. The Shell will read
commands from the new window, and will use the same window for
output. This new Shell window can only be terminated by using the
EndCLI command.

Under V37, if an input filehandle is passed, and it's either
interactive or a NIL: filehandle, the pr_ConsoleTask of the new
process will be set to that filehandle's process (the same applies
to SystemTagList()).

For this command to work the program Run must be present in C: in
versions before V36 (except that in 1.3.2 and any later 1.3 versions,
the system first checks the resident list for Run).

INPUTS
commandString - pointer to a null-terminated string
input - BCPL pointer to a file handle
output - BCPL pointer to a file handle

RESULTS
success - BOOLEAN indicating whether Execute was successful
in finding and starting the specified program. Note this
is NOT the return code of the command(s).
SEE ALSO
SystemTagList(), NewShell, EndCLI, Run//

/
/

------------------------------------------------------------------------
IT Professionals: Match your unique skills with the best IT projects at
http://click.egroups.com/1/3381/1/_/451227/_/956154214/
------------------------------------------------------------------------