SHELL calls from FiveTouch

SHELL calls from FiveTouch

Postby Antonio Linares » Tue Mar 05, 2019 10:34 am

Notice that hb_Run() works but hb_ProcessRun() does not work.

Code: Select all  Expand view
#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  
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SHELL calls from FiveTouch

Postby Antonio Linares » Tue Mar 05, 2019 10:40 am

Code: Select all  Expand view
#include "FiveTouch.ch"
     
function Main()
     
   hb_Run( "pwd > info.txt" )  // print working directory
   MsgInfo( MemoRead( "info.txt" ) )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SHELL calls from FiveTouch

Postby Antonio Linares » Tue Mar 05, 2019 10:53 am

Building a shell script and executing it:

Code: Select all  Expand view
#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         
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveTouch

Who is online

Users browsing this forum: No registered users and 3 guests