Page 1 of 1

What´s wrong with my applescript?

Posted: Fri Apr 08, 2011 8:21 pm
by Johan Söderberg
I made myself a talking LXConsole and it worked just fine - until I tested it in Live mode.

Is there anyway I can make it work also in live mode?


I'd like to put it as a button in a remotecontrol so that when I'm away from the computerscreen I can send a message out to the PA telling me what it is that I'm looking at on stage right now...

This is how it looks:
tell application "LXConsole"
set _cue to currentCue of the front document
set _number to cueNumber of _cue
set _what to what of _cue
set _when to when of _cue
end tell
say "You are now in Cue number" using "alex"
say _number using "victoria"
say "Described as ." using "alex"
say _what using "victoria"
say "To be run at" using "Alex"
say _when using "victoria"
It works well in Cuemode! But I don't want to be in cuemode while I'm remotecontrolling.

If you want to try it just copy/paste.

And maybe add a new second line:
tell the front document to gotoNextCue
or
tell the front document to gotoPreviousCue
Have fun!

Posted: Tue Apr 12, 2011 4:41 pm
by admin
LXConsole 2.1.3 (latest build) fixes this problem with AppleScript. You can now make a cue "talk" in Live mode :-)

Works fine!

Posted: Thu Apr 14, 2011 11:42 pm
by Johan Söderberg
And is quite fun! "Alex" and "Victoria" both have a very strong American accent that reminds me a lot of the first AVAB Viking consoles.
I haven´t heard that weird accent since 1985.
Everytime you changed something in the Vikings presets the superfancy hightech speech module asked with a robotic nasal voice: "are you sure?" .
It used to drive me crazy :)

Posted: Sat Apr 23, 2011 2:18 am
by Johan Söderberg
A slight improvement:
tell application "LXConsole"
set _cue to currentCue of the front document
set _number to cueNumber of _cue
set _what to what of _cue
set _when to when of _cue
end tell

say "You are now in Cue number" using "alex"
say _number using "victoria"
if _what is not equal to "" then
say "Described as" using "alex"
say _what using "victoria"
end if
if _when is not equal to "" then
say "To be run at " using "Alex"
say _when using "victoria"
end if
I added two if-cases just to keep it quiet if there is no info to read out. Without these it will say "described as, to be run at." even if the "what" and "when" fields are empty.
Note that a blankspace is not equal to nothing!
If you see no text in any of the two fields but it still reads out its' introduction that is probably because there is a blank space somewhere.
This now works in Cue, Group, Subs and Live mode if you run LXConsole version 2.1.3 or more. :D