Accessing variables set using SET /U or SET /S

Dec 2, 2008
226
2
Canada
How do you access variables set using SET /U or SET /S

I want to pass PID information between different TCC session.

For example:

session one:

SET /U S1PID=%_pid%

session two:

TASKEND /F %S1PID%

Craig
 
May 20, 2008
3,515
4
Elkridge, MD, USA
cgunhouse wrote:

| How do you access variables set using SET /U or SET /S
|
| I want to pass PID information between different TCC session.
|
| For example:
|
| session one:
|
| SET /U S1PID=%_pid%
|
| session two:
|
| TASKEND /F %S1PID%

Combine the /E option with /U or /S to force the other sessions to see
the variable. However, that still does not make them accessible to the
parser, which you need to access the value. The method I found is to use
@EXECSTR[set /u s1pid]
which works correctly.
Alternately, you can use Vince Fatica's plug-in 4UTILS.DLL, which has
the command GSET to set the global variable, and the function @GV[] to
retrieve its value.
--
HTH, Steve
 
Dec 2, 2008
226
2
Canada
cgunhouse wrote:

| How do you access variables set using SET /U or SET /S
|
| I want to pass PID information between different TCC session.
|
| For example:
|
| session one:
|
| SET /U S1PID=%_pid%
|
| session two:
|
| TASKEND /F %S1PID%

Combine the /E option with /U or /S to force the other sessions to see
the variable. However, that still does not make them accessible to the
parser, which you need to access the value. The method I found is to use
@EXECSTR[set /u s1pid]
which works correctly.
Alternately, you can use Vince Fatica's plug-in 4UTILS.DLL, which has
the command GSET to set the global variable, and the function @GV[] to
retrieve its value.
--
HTH, Steve

Yes, that works for me, thanks!

Craig
 
May 20, 2008
11,411
99
Syracuse, NY, USA
On Wed, 20 Oct 2010 13:46:06 -0400, Steve Fábián <> wrote:

| Alternately, you can use Vince Fatica's plug-in 4UTILS.DLL, which has
|the command GSET to set the global variable, and the function @GV[] to
|retrieve its value.

GSET and @GV use a proprietary registry key, HKCU\JPGlobal; that may be fine if
sharing is the only objective.

4UTILS also offers @GEV[name[,s|u|v|d]] to retrieve those set with SET s|u|v|d
(or others in the registry's four environment keys).
 
Similar threads
Thread starter Title Forum Replies Date
C Error when accessing jpsoft.com Support 3
S Trouble accessing results of forum search Support 2
Fross Accessing No-Drive Letter Resources Support 4
S Accessing binary clipboard Support 1
Peter Murschall v27.00.16/17: ENDLOCAL with exporting variables wipes out the complete Environment Support 2
S How to? best way to compose data for command to use out of presets/variables Support 1
Joe Caverly START Dialog usage of %_ variables Support 0
Joe Caverly Modified Variables in CMDebug/BDebugger Support 1
T How to? Show the values of batch variables on the TCC screen Support 21
J Escaped Characters and Variables Support 2
M Keywords for commands, functions, internal variables Support 3
D How to? How to show variables expanded in the log tab Support 3
Charles Dye Read-only environment variables wiped by SETLOCAL / ENDLOCAL Support 5
U Variables _IFTP, _IFTPS: what about sftp connections? Support 2
J Shell nesting level, and inherited environment variables Support 10
M Verification re volatile variables... Support 41
fpefpe Documentation environment variables Support 3
fpefpe How to? Environment Variables changed Support 2
Stefano Piccardi 14.01.33 unset doesn't complain about undefined variables Support 8
CWBillow Variables in shortcuts? Support 15
Frank WAD handling variables with $-prefix Support 14
daniel347x How to get Take Command to read in all current system environment variables that CMD.EXE sees? Support 13
vefatica What environment variables does IDE need? Support 3
G gosub variables Support 9
vefatica Leading spaces in array variables Support 13
E Environment variables, set and input Support 2
V Set path permanently from within TCC? Support 3
S Debugger keeps breaking with no break point set. Support 1
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
R How to? Set default application in a special folder Support 4
A How to? Set up SMTP password in TCC-RT Support 1
vefatica WAD More SET /A woes Support 4
vefatica SET /A and multidimensional array. Support 1
M How to set Path variable for non-executable file extensions in 4DOS Support 8
D Need to set Take Command font size when switching to high DPI display Support 0
P "Set" command behavior - a bug? Support 3
M How to? Set the ribbon titles to mixed case Support 1
X How to set %_INIREAD result to variable Support 5
M WAD Set statements in () causes problems Support 8
M How to? How to set a default TITLE for newly opened tab? Support 2
M Fixed Set "VAR=VAL" format causes problems Support 12
vefatica SET /A var=expression=digits Support 3
cxxl Set encoding for batch file Support 4
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
vefatica SET /A var\=...? Support 10
dcantor Documentation SET /T: missing from heading Support 0
fpefpe Documentation Set /v Support 4
vefatica What's SET /Z? Support 1
R Fixed set /r has stopped working in build 35 Support 4
BeechComer Debugger: how to set %1 variable? Support 3

Similar threads