[F-Script-talk] Re: stdout in fscripter
Brought to you by:
pmougin
From: Philippe M. <pm...@ac...> - 2002-05-06 14:32:10
|
It is possible to output things on stdout using Cocoa APIs (since, stdout is a UNIX file, you can use the Cocoa file I/O APIs). It is also possible to launch "system commands" from F-Script; Again, you can use standard Cocoa APIs from F-Script to do that. You can also look at the FSTask class that comes with F-Script (this class is not documented but you can figure how it works by looking at source code and the example in the header file). While not completely trivial, it would not be too hard to write a standard UNIX command line tool version of F-Script: a tool that would read its instructions on stdin and produces some output on stdout. But as it stands, it would be far to offer the convenience of Perl to deal with files, systems commands and so on. We would need to add an easy notation to cretate "files" objects and a high-level and well integrated way to deal with "system commands" and to generate output to stdout. Best, Phil ----- Original Message ----- From: "bob ackerman" <rd...@pa...> Subject: [F-Script-talk] stdout in fscripter > i notice that if i have a syntax error in a script, it gets printed out in > the terminal session where i ran the script. > so might it be possible to directly output a string from a script to the > terminal via stdout, say? > a longer shot would be to get command line arguments when running a script. > that would make fscripter a fully functional command line tool. > well, maybe not fully functional - would need a way to execute system > commands from an script and retrieve results from stdin. > thinking of it as high power perl with system level access on one side, > and Cocoa access on the other, with FScript as the language in the middle. > is any of this even feasible - as feature requests? |