OSL ‐ Transmit - Mistium/Origin-OS GitHub Wiki

Send data to a window

transmit data window_id
// send data to a window

Handle receiving data

You will want something like what is below inside of your mainloop to handle all incoming transmit

if new_transmit (
  // theres new data to handle
  log transmit_source
  // log the id of the window that sent you data (normally so you can respond)
  log transmit_data
  // log the data from the transmit
  new_transmit = false
)

Possibly helpful info

You can get the window id of the window that created you using

window.parent.id
// returns an integer

You can get a list of window ids that you have created from the variable

window.children
// returns data like ["34","43","44","56"]

any time you make a window it counts as a child, heres an example

window "add" window.file.uuid "data"
// the data is what that window receives in the variable "passed_data"
// window.file.uuid returns the uud of the file that this window is made from, essentially making an exact duplicate window