|
Post by ekvirtanen on May 14, 2011 15:24:46 GMT -5
Documention provided with RB and wiki tells next.
Next code works
cls input "Press a button "; a$ a$ = ProjectsRoot$ + "/runRuntime_project/prg2.bas" open a$ for binary as #f print #f, "for i = 1 to 10 : print i : next i" close #f
run "prg2.bas", #loop render #loop
a$ = "rm " + a$ print shell$(a$) wait
However, if i take handler off and try to run it synchronously by changin the code as next
cls input "Press a button "; a$ a$ = ProjectsRoot$ + "/runRuntime_project/prg2.bas" open a$ for binary as #f print #f, "for i = 1 to 10 : print i : next i" close #f
run "prg2.bas"
a$ = "rm " + a$ print shell$(a$) wait
Result is
|
|
|
Post by ekvirtanen on May 15, 2011 7:07:50 GMT -5
I forgot to mention i use linux version of latest rb, full version.
|
|
|
Post by StefanPendl on May 15, 2011 8:13:08 GMT -5
I have always used the option to render the run program as an object, which does not fail. I don't remember, if I ever used to run another BAS synchronously. The following additions will allow to run it on Windows too. cls Button #cont, "Push the button", [letsGo] print print wait
[letsGo] if Platform$ = "win32" then a$ = ProjectsRoot$ + "\runRuntime_project\prg2.bas" else a$ = ProjectsRoot$ + "/runRuntime_project/prg2.bas" end if
open a$ for binary as #f print #f, "for i = 1 to 10 : print i : next i : print" close #f
run a$ ', #test 'render #test
if Platform$ = "win32" then del$ = "del /f /q "; chr$(34); a$; chr$(34) else del$ = "rm " + a$ end if
print shell$(del$) wait
|
|
|
Post by ekvirtanen on May 15, 2011 13:49:38 GMT -5
Yep, it is a bug at linux version. I can survive with reder statement though, but would be good to get fixed in future releases.
|
|