How to print the value in second windows

I reopen another conversation to be more clear. I am making a program for my RS232 device. The program involves searching for devices and switching commands via buttons.

My main window is this:

When I click on Search the various addresses appear on the TextArea. When one appears, I click on SEND and another window opens. From there I send ON / OFF commands to switch LEDs on the device. This works, but I have a problem. When I click ON / OFF the device replies with a “from” value and I have to display it on window2. Now this shows it to me on window1, which I don’t want. I attach the problem here:

Then:

On window1 I just want the addresses and in window2 the da. How can I do it, please help me.

Hello Mario,

It would help a lot if we could see your code…

But anyway, if you are stuck with this I would recommend taking some time to go through some of the books/tutorials/videos you can find here:
http://documentation.xojo.com/resources/third_party/books-_magazines-_videos_and_tutorials.html

Julen

you need something like this?
answer=“da”
select case answer
case “da”
Self.TextFieldActuator2.Text=answer
Self.W2.TextArea.Text = Self.W2.TextArea.Text + answer

where W2 is a property in Window1 and contain your other window.

or you make a protocol and send from window 2 to device
f2,ch1,on
and return from device
f1,actuator1,da
f2,ch1,da

so you have some kind of data for routing.

Imagine you want to place a value in Window2.TF_Result from window1; use:

Window2.TF_Result.Text = "My nice text from Window1"

Maybe they are almost there, there is a command to say send command1 wait until the command has been received send command2. I tried a delay between the two, but I can’t send command2.

the tricky part is to fiddle the in and out from serial data into a structure.
try to send a instruction with a begin and end keyword and a return as confirmation.
you could use a command list and a timer to run the dialog asynchronous.