Page 1 of 1

applescript docommand

Posted: Thu Jan 09, 2020 4:47 am
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 !

Posted: Sat Jan 11, 2020 2:53 pm
by admin
tell application "LXConsole"

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

end tell

Posted: Sat Jan 11, 2020 6:57 pm
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

Posted: Sun Jan 12, 2020 4:51 pm
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.)

Posted: Sun Feb 09, 2020 12:09 am
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 !

Posted: Sat Feb 15, 2020 1:33 pm
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.