Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Sat Feb 09, 2002 4:35 am |
There is a predefined variable %names that contains all session window names. However I do not think you can directly access the data you want in another session. What can do is arrange an alias trigger combo to pass the data back and forth.
For the sake of this rough code we will assume the session with the map data is A and the one making the rooms is B.
In A we will make the alias:
#AL FetchRoom {#IF (%ismember("%1",%names)=0) {#SHOW Invalid return window name!;#BEEP} {:%1:#VAR RoomName {%roomname(%roomnum)};:%1:#VAR RoomDesc {%roomdesc(%roomnum)};:%1:RoomDataReady}}
Next in B we make a few aliases:
#AL MakeRoom {#IF ("%1"="") {#SHOW Direction required!} {RoomDir="%1";:A:FetchRoom %window}}
#AL RoomDataReady {#IF (@RoomDir="") {#SHOW Use MakeRoom first to set direction.} {#MAKEROOM {@RoomDir} {@RoomName} {@RoomDesc}}}
Hopefully I didn't forget too many }. Also you will have to change the :A: to match whatever is the correct name or if you only use 2 session windows you can get fancy %delitem(%window,%names) and have the whole thing automatic. There is more error checking you should be doing in there, but it is up to you to read the help files on everything in there and understand how to make it better. |
|