By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!CurrentPID=%@strip[*,%@word[0,%@execstr[tasklist tcc | findstr "*"]]]
set _CurrentPID=%@Currentpid[]
#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN () AS LONG
DIM TCCPID AS STRING
DIM Command2Run AS STRING
DIM TCCRT AS STRING
TCCRT="C:\Program Files\JPSoft\TCC_RT_24\tcc.exe"
TCCPID=ENVIRON$("_CurrentPID")
? TCCPID
Command2Run=TCCRT + " /C setp " + TCCPID + " FromEXE=Test"
SHELL Command2Run
END FUNCTION
#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN () AS LONG
OPEN "c:\utils\test.ini" FOR OUTPUT AS #1
PRINT #1, "[Main]"
PRINT #1, "FromEXE=Test"
CLOSE #1
END FUNCTION
c:\users\jlc\utils>type test.ini
[Main]
FromEXE=Test
c:\users\jlc\utils>echo %@iniread[c:\utils\test.ini,Main,FromEXE]
Test
And if it would be confused with other output, write the return string to stderr and redirect stderr when calling your EXE, something likeA third approach: Just write your string to stdout. Snag it with @EXECSTR.
2>result.txt my_proggie.exe
echo my_proggie.exe gave me the string %@line[result.txt,0]