FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveTouch SHELL calls from FiveTouch
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
SHELL calls from FiveTouch
Posted: Tue Mar 05, 2019 10:34 AM
Notice that hb_Run() works but hb_ProcessRun() does not work.

Code (fw): Select all Collapse
#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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SHELL calls from FiveTouch
Posted: Tue Mar 05, 2019 10:40 AM
Code (fw): Select all Collapse
#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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SHELL calls from FiveTouch
Posted: Tue Mar 05, 2019 10:53 AM
Building a shell script and executing it:

Code (fw): Select all Collapse
#include "FiveTouch.ch"
      
function Main()
      
   MemoWrit( "go.sh", "am start -a android.intent.action.VIEW -d <!-- m --><a class="postlink" href="http://www.fivetechsoft.com">http://www.fivetechsoft.com</a><!-- m -->" )
   hb_Run( "sh go.sh > info.txt" )
   MsgInfo( MemoRead( "info.txt" ) )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion