applescript docommand

LXConsole support and feedback
Post Reply
Pace514
Posts: 105
Joined: Sat Aug 29, 2015 6:19 pm
Location: Montréal

applescript docommand

Post by Pace514 »

Hello Claude !!!

Applescript dictionary says:
doCommand v : Do as if text was entered on command line
doCommand document
string text

From what i understand, Let's say i want to set channel 61 at 99%
i've tried this but it does not work.

tell application "LXConsole"
tell the front document to doCommand "61@99"
end tell

How should we use the doCommand ?

Thanks !
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

tell application "LXConsole"

tell the front document to doCommand string "61@99"

end tell
Pace514
Posts: 105
Joined: Sat Aug 29, 2015 6:19 pm
Location: Montréal

Post by Pace514 »

OK, thanks ! I was missing "string".

I started to learn applescript 3 weeks ago so, it still very abstract to me.

Now i'd like to send an OSC message via applescript. what would be the correct syntax ?

tell application "LXConsole"
tell the front document to sendOSC "clear subs" toaddress "??????"
end tell

Thank again !

Pascal
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

sendOSC does not do what you think it does. It sends an OSC message with a string argument to the current OSC output target.

If you have the LXConsole Remote open on touchOSC, then you can do the following:

tell the front document to sendOSC string "hello there" toAddress "/1/cmdline"

(This assumes that you have LXConsole's OSC out connected to your iPhone or iPad running touchOSC.)
Pace514
Posts: 105
Joined: Sat Aug 29, 2015 6:19 pm
Location: Montréal

Post by Pace514 »

OK ! I can see "hello there" in my command line and it stays there.
So i replace it by let us say: "1>8@ 66". Now i can see it in my command line but nothing happen in LXCONSOLE.

If enter 1>8@ 66 directly on my Ipad, command line clear itself automatically and channels are set accordingly.

What am i missing ?

Thanks again !
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

All you are doing by sending the string via OSC is to set the text of the label in touchOSC.

If you want to use AppleScript to have LXConsole do a command as if it were entered on the command line, you wouldn't use OSC at all.
Post Reply