1. global osc
  2.  
  3. ----------------------------------------
  4. --
  5. ----------------------------------------
  6. on startMovie
  7.   osc = xtra("OSC").new()
  8.   osc.setDestination("127.0.0.1", 5500)
  9. end
  10.  
  11. ----------------------------------------
  12. --
  13. ----------------------------------------
  14. on stopMovie
  15.   osc = void
  16. end
  17.  
  18. ----------------------------------------
  19. -- forward "put" calls to MessageWindow.app
  20. -- (alternatively overwrite "trace")
  21. ----------------------------------------
  22. on put (val) -- ,...
  23.   args = []
  24.   repeat with i = 1 to the paramCount
  25.     args.add(string(param(i)))
  26.   end repeat
  27.   osc.send(["/msg", args])
  28. end
  29.  
  30.  
  31. -- test
  32. on test
  33.   put "Hello"
  34.   put [#a:23]
  35.   put _system.EnvironmentPropList
  36.   put "hello", 23, "world"
  37. end
  38.  
[raw code]