birdie
24th July 2012, 16:18
I want to send a message from one session to another, and this is what I tried so far, but without any success. I tried to learn from the threads already posted in past, but still do not understand what I do wrong.
Please help!

------ Scenario 1 --------------------
App1 - should send some message to app 2
declaration:
long w
w = act.and.sleep("app2")
choice.cont.process:
on.choice:
send.bucket(w,"message.text")

App2 - should receive message from app 1 and do something with that
declaration:
received.text(100)

choice.bms:
before.choice:
received.text = bms.receive$()
do.some.action.based.on.received.text()

------ Scenario 2 --------------------
I aslo tried with to add in app1, instead of act.and.sleep:
app1:

choice.cont.process:
after.choice:
long event(EVTMAXSIZE)
evt.type(event) = EVTBUCKETMESSAGE
evt.bms.sender(event) = pid
bms.send("done.well", event, "some.text",evt.bms.sender(event))


app2:
declaration:
received.text(100)

before.program:
bms.add.mask("some.text")

choice.bms:
on.choice:
received.text = bms.receive$()
do.some.action.based.on.received.text()