Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
Warning: Undefined array key "p" in /home/clients/a70cbb4a74edf8105da5fd7e142fb9de/web/forum/includes/vb5/template.php(404) : eval()'d code on line 794
sending a OSC message from an applescript -
OSCulator Forum
If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I'm looking for a way to send a OSC message from an applescript in way to change the text of a label in touchosc. Something like "D -> iphone (touchOSC) /1/Label1 : "my_text" where my_text is a variable created by this applescript.
Any clue about how to do this?
Unfortunately It has to be an AppleScript. I have to combine some informations comming from different apps.
I'm going forward in my searching : it seems that the soft described on this page is what I need. The problem is that the compiled version seems to be compiled for PowerPC processors. There is a code source version but it has to be compiled. Do anyone know how to compile for intel processors?
Hi cam,
thanks for the answers on my different threads...
Its going forward...
sendosc doen't seems to give an error message but... doesn't have a result in osculator or touchosc...
whatever i tipe in the "message" part of my command line the answer is
"host localhost, port 8000, use type tags"
Do i have to create an osc routing in Osculator with 2 as target like in the different thread?
GOT IT !!
i tried it one more time and get it working :
For the entry /1/label1, i created a new OSC Routing with target 2 and rewrite address to 1/label1 (yes, i FORGOT the first / in what usually is /1/label1 ).
When i triggered my shell script, osculator created a new entry (1/label1 with OSC routing D-> /1/label1 : s - yes, no first / in the entry and a first / in the routing; inverted with entry i created) and... it works!
Don't know why but it works
When i tried it with my forgotten "/" it didn't work anymore...
for those who wants to try, heres an applescript:
Code:
property oscport : "[COLOR=#00ff00]8000[/COLOR]"
property osclabel : "[COLOR=#00ff00]/1/label1[/COLOR]"
property osccommand : "sendOSC -h localhost "
property myWrong : "!$,;~"
property myRight : "*"
[COLOR=#ff0000]set my_dialog to display dialog "Texte :" default answer ""
set oscmessage to text returned of my_dialog[/COLOR]
repeat with AA from 1 to 5
set mychar to character AA of myWrong
set oscmessage to textChange(oscmessage, mychar, myRight)
end repeat
set my_OSC to osccommand & oscport & " " & osclabel & "," & (quoted form of oscmessage)
do shell script my_OSC
on textChange(myText, _old, _new)
set saveTID to text item delimiters
set text item delimiters to _old
set listeElements to text items of myText
set text item delimiters to _new
set myText to listeElements as text
set text item delimiters to saveTID
return myText
end textChange
copy this code to your applescript editor.
The green text has to be changed to your settings
the red text can be changed to whatever you want to do with the script.
the textchange fonction is needed to avoid the use of some special characters
The compiled version of the sendOSC utility is attached
When i triggered my shell script, osculator created a new entry (1/label1 with OSC routing D-> /1/label1 : s - yes, no first / in the entry and a first / in the routing; inverted with entry i created) and... it works!
It seems you have activated the preference "try to backmap incoming OSC".
I recommend you deactivate this option if you don't need it.
Just out of curiosity, I was wondering what program was triggering the AppleScript, could you give a little description?
Thanks!
I tried to unactivated the preference "try to backmap incoming OSC" and to erase the "automaticly generated" entrys.
when i triggered the applescrit they were re-generated... but without OSC routing... and the labels on touchsc didn't change.
i reactivated the prefence so that the osc routings were re-generated an unactivated the prefence after that. It stay working even after relaunching the application.
So if i hadn't activated this preference i still would be searching to make it work...
OSCulator is triggering the applescript (when i press a button on touchosc). The applescript takes informations in itunes and in Lxconsole and display this information on a bunch of labels in one time (18 in my case and most of them dislay more than one information).
It could also have been a loop turning in background and refresching the labels every 5 or 20 seconds.
Once more, thank you for your reactivity to help us with all our weird questions about OSCulator.
Un grand merci pour ton aide sur mes questions débiles et parfois hors norme.
Apologies for jumping on an old thread rather than creating a new one, but this sounds like a solution to a problem I am facing.
I have downloaded the "compiled" SendOSC zip files above but this doesn't seem to load up as when I run
do shell script my_OSC
it comes up with error
error "sh: sendOSC: command not found" number 127
Any help would be gratefully appreciated
And a long delayed reply, but may help someone in the future. If sendOSC is not in your "path" (UNIX terminology), you must give the full path to it in the command eg: /Users/phil/Downloads/sendOSC or whatever.
On that note, it would be wonderful if Osculator exposed a method to receive "virtual" osc events via applescript directly.
Comment