Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Accessing variables set using SET /U or SET /S

Dec
233
2
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
 
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
 
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
 
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

Back
Top