I don't claim to uinderstand what you are after but creating the same named GLOBAL variable in two apps is easy. You need some method of inter application communication to connect them.
Two (2) techniques,
1. SendMessage using the HWND_BROADCAST message for signalling.
rcall SendMessage,HWND_BROADCAST,PM_COMMAND,0,0
2. Memory mapped files for data.
If one is calling the other, the command line works OK.