SHELL calls from FiveTouch

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 42715
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

SHELL calls from FiveTouch

Post by Antonio Linares »

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

Code: Select all | Expand

#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: 42715
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

Re: SHELL calls from FiveTouch

Post by Antonio Linares »

Code: Select all | Expand

#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: 42715
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 93 times
Been thanked: 103 times
Contact:

Re: SHELL calls from FiveTouch

Post by Antonio Linares »

Building a shell script and executing it:

Code: Select all | Expand

#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