Getting Variable Content

Normen Teuber

New Member
Hi,
my question is a bit complicated:
I have prog1.w and prog2.w
prog1.w starts prog2.w.
Is there a tricky way to get in prog1.w the value of an variable of prog2.w
without modifying prog2.w ?
That means i do not have shared variables ........
Does anybody now a way ?

Kind regads in advance for your help.

Normen Teuber
 
If prog2.w doesn't 'expose' the value in some way then there's no way to do it without changing prog2.w.

Off the top of my head your options are as follows:

1. From prog1.w run a procedure (or call a function) in prog2.w to get the value.
2. From prog2.w run a procedure (or call a function) in prog1.w to pass the value.
3. Do you really mean a 'variable'? If the value is actually displayed (e.g. it's a widget) then you can loop around the widget tree (whilst prog2.w is still open) and get the value that way
4. Write the value somewhere that can be seen by prog1.w and prog2.w (e.g. disk, clipboard etc.)
5. Use the procedure RETURN-VALUE from prog2.w

You can also use run-time parameters, but this would invalidate all other calls to prog2.w, unless you change them too. I presume you want to avoid this.

Options 1-4 can be used without affecting any other program that runs prog2.w.

Option 5 can only be used if prog2.w isn't already returning a value that has another meaning
 
Back
Top