From: Jim I. <ji...@ap...> - 2002-03-12 18:02:23
|
On Monday, March 11, 2002, at 11:12 PM, Andreas Otto wrote: > Am Montag 11 M=E4rz 2002 17:23 schrieben Sie: >> At 3:16 PM +0100 3/11/02, Andreas Otto wrote: >>> there have to be a way to call additional executables from >>> a Tcl script >> >> and there is... just not the Tcl norm. > > Hi, > > are examples available ... > > from main >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > void > main( > int argc, /* Number of arguments. */ > char **argv) /* Array of argument strings. = */ > { > char *newArgv[2]; > > if (MacintoshInit() !=3D TCL_OK) { > Tcl_Exit(1); > } > > argc =3D 1; > newArgv[0] =3D "tclsh"; > newArgv[1] =3D NULL; > Tcl_Main(argc, newArgv, Tcl_AppInit); > } > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > why does tcl blow away the argv array ? There is no way to start up a Macintosh executable and pass it an argc,=20= argv. So the argv will ALWAYS be empty. But the rest of Tcl is unhappy=20= with having nothing in the argv array, so we put this minimal entry into=20= it. Jim > > > >> >>> I need the channel output back into a string >>> >>> I have an additional API for calling external SW -> >>> does Applescript helps ? >> >> Sure AppleScript/Tclapplescript is one option. My TclAE > > Is a download path available ? > > > is another. >> In either case, you can get a reply, assuming the external app sends >> one, but it's really not the same as the channel output you are >> probably expecting. >> >>> does "open |..." works ? >> >> Mac OS 9? No. No pipes. >> >>> 1) is a commandline interface available >>> >>> cammandline + some kind of exec would be perfect >> >> Neither of these things really exist on Classic Mac. CodeWarrior >> provides for a limited command-line interface in your apps (look for >> docs on SIOUX and ccommand()). If you want your app to execute other >> apps, you'll need to do it with AppleEvents. Tell us more about >> exactly what you'd like to do and we can tell you more about how to >> accomplish it. > > Hi, > > the current strategic decision would be using the xml interface of > code-warrior. Yo can create a Code warrior project as xml file and > import it into the gui. > > One help would be not only to cretae the xml files, it should be=20 > possible > to call code-warrior to do the compiling and linking themself without > using the user-interface. If this is possible it would be a big step=20= > in the > right direction. > > >> >>> 2) is a cross compiler linux -> macOs9.1 ppc available >>> gcc does not support MacOs9.1 (this speak for them- >>> self) perhaps CodeWarrior ??? >> >> CodeWarrior has a linux variant. I've never used it and don't know >> what it's cross-compilation options are. > > _______________________________________________ > Tcl-mac mailing list > Tc...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-mac > -- Jim Ingham ji...@ap... Developer Tools - gdb Apple Computer |