SHELL calls from FiveTouch

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

SHELL calls from FiveTouch

Post 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  
regards, saludos

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

Re: SHELL calls from FiveTouch

Post 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
regards, saludos

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

Re: SHELL calls from FiveTouch

Post 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          
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply