|
Post by votan on Sept 30, 2008 11:08:53 GMT -5
Posted this in the wrong section first..... so I'll ask again here...
In the description of the new features of RB Beta 3 it says But how can I actually access the returned output in RB?
I'm processing files with an external tool and need to process the generated output via RB to fetch some special informations about the files. shell$() works fine so far.... I just need to be able to access the text output...
Would be cool if anyone knows how to do it.... else I'm really stuck....
|
|
|
Post by carlgundel on Sept 30, 2008 11:51:23 GMT -5
Try this:
exec$ = "some command" result$ = shell$(exec$) print result$
-Carl
|
|
|
Post by votan on Sept 30, 2008 14:21:58 GMT -5
No, does not work..... no output text is returned to RB this way....
|
|
|
Post by Carl Gundel - admin on Sept 30, 2008 14:36:22 GMT -5
No, does not work..... no output text is returned to RB this way.... What command are you trying to execute? Are you on Windows? Try: print shell$("dir") -Carl
|
|
|
Post by votan on Sept 30, 2008 15:31:39 GMT -5
Argh... well, my fault.... thought the print statement is needed to actually execute the shell function. And together with a tiny typo in my command, it all resulted in doing nothing at all. Shell$.... best function ever!!!
|
|
|
Post by carlgundel on Sept 30, 2008 15:57:36 GMT -5
Argh... well, my fault.... thought the print statement is needed to actually execute the shell function. And together with a tiny typo in my command, it all resulted in doing nothing at all. Shell$.... best function ever!!! I'm glad you like it. Of course you will only get a text result from programs that send to stdout (and maybe stderr, gotta figure that out). -Carl
|
|