Page 1 of 1

SHELL calls from FiveTouch

Posted: Tue Mar 05, 2019 10:34 am
by Antonio Linares
Notice that hb_Run() works but hb_ProcessRun() does not work.

Code: Select all

#include "FiveTouch.ch"
      
function Main()
      
   hb_Run( "export > info.txt" )  // list environment variables, use GetEnv() to retrieve their values
   MsgInfo( MemoRead( "info.txt" ) )

return nil  

Re: SHELL calls from FiveTouch

Posted: Tue Mar 05, 2019 10:40 am
by Antonio Linares

Code: Select all

#include "FiveTouch.ch"
      
function Main()
      
   hb_Run( "pwd > info.txt" )  // print working directory
   MsgInfo( MemoRead( "info.txt" ) )

return nil

Re: SHELL calls from FiveTouch

Posted: Tue Mar 05, 2019 10:53 am
by Antonio Linares
Building a shell script and executing it:

Code: Select all

#include "FiveTouch.ch"
      
function Main()
      
   MemoWrit( "go.sh", "am start -a android.intent.action.VIEW -d http://www.fivetechsoft.com" )
   hb_Run( "sh go.sh > info.txt" )
   MsgInfo( MemoRead( "info.txt" ) )

return nil