Page 1 of 1
Odd OSC and Applescript issue
Posted: Mon Sep 17, 2018 1:52 am
by nizer
Try to have LXConsole go to the next dimmer when in dimmer mode (m1) via QLab 4
I can turn on the mode with:
Code: Select all
tell application "LXConsole"
setMode the front document to "live"
set startdimmertest to "dimmer:1af"
set dimmernumber to 1
tell the front document to doCommand string startdimmertest
say "Starting Dimmer Setup"
say "dimmer" & dimmernumber
end tell
I can get channel 1 set to 88 via OSC like this.
However, I used to be able to move onto the next dimmer with the "u" key in the command line via this Applescript:
Code: Select all
tell application "LXConsole"
activate
setMode the front document to "live"
set nextdimmer to "u"
tell the front document to doCommand string nextdimmer
tell application "System Events" to keystroke "u"
end tell
Also this should work but doesn't
OSC message
From my iPad if I send the OSC message
it works.
Not sure what has changed or what I am missing. Thanks for any guidance.
Posted: Mon Sep 17, 2018 2:27 pm
by admin
Have you changed the preferences for the command line?
Check the preferences tab to see what you have set for up and down commands. There should be two alternatives for each. The first key should be "u" and "d" respectively. Do these keys work at the computer? Is it only the AppleScript that is a problem?
OSC applescript oddness
Posted: Mon Sep 17, 2018 3:14 pm
by nizer
So I check the preferences and they are set to defaults. Oddly there are 2 keys for "u" one is "unmark" and one is for "up".
So I messed around some more. If I route the OSC from QLab to Osculator port 8889 then have Osculator forward to LXConsole port 8888 it works.
/key.lxconsole/u or /key.lxconsole/+
If I go direct to LXConsole port 8888 from QLab it fails. But I send OSC to change levels of channel 1 to 75% that works.
Also all applescript for u or + also don't work, even directly from ScriptEditor.
SO ODD!!!!!
Posted: Mon Sep 17, 2018 7:57 pm
by admin
It may have to do with the fact that the key "u" is contextual. It can be applied as unmark or up. Try the more specific "@++"
Code: Select all
tell application "LXConsole"
activate
setMode the front document to "live"
set nextdimmer to "@++"
tell the front document to doCommand string nextdimmer
end tell
works for me.
Posted: Mon Sep 17, 2018 7:59 pm
by admin
I would note that using @++ and @-- to move through the dimmers works when used in sequence. Start with a dimmer. Go through the dimmers sequentially. Don't go off and do anything else with the command line in the middle of the dimmer check.
OSC and script issues
Posted: Mon Sep 17, 2018 9:47 pm
by nizer
I will try that in a few minutes. Does OSC work for you from Q lab for sending those commands? It is so strange that it works for Channel levels but not for changing the dimmer.
Works
Posted: Mon Sep 17, 2018 10:29 pm
by nizer
per usual your genius comes thru. Applescript works now. Still have no clue why OSC is broken. I will roll back to QLab 3 and see if I can get it to work.
THANK YOU!!!!
OSC update QLab 4
Posted: Tue Sep 18, 2018 1:58 pm
by nizer
So this works via QLab 4 OSC
/cmd.lxconsole/@++
but this doesn't
/cmd.lxconsole/u
/cmd.lxconsole/+
All is well.
Thank you again.
Posted: Tue Sep 18, 2018 2:39 pm
by admin
For OSC from QLab, you would use
or
This depends on the command line preferences... Note that the second example uses "=" not "+" because its the same key (without having to use [shift]).
The 1 is an argument for the message. LXConsole requires that messages with the address pattern /key.lxconsole/ have a non-zero argument. The reason for this is that it allows these messages to be used with push buttons where the message is sent with a 1 on press and a zero on release.
OSC Issue
Posted: Wed Sep 19, 2018 3:07 am
by nizer
Of corse!!! That all makes sense now. Lemur uses the O and 1 as a button input variable.
Thanks for following up.
I will sleep much better knowing the world works in predictable ways.
My setup is working so nice. I am very happy with it. So many tools and options to crank out the tech.