Thanks,
Clay
________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com
Do the things that please you, and do them well.
--- On Mon, 2/8/10, Clay Benning <cl...@stoutpost.com> wrote:
On Feb 9, 2010, at 12:07 AM, luckydave wrote:
> I don't think that's there yet. Looking in the scripting
> definitions, all i come across is "Color" from the Standard Suite,
> not the QLab Suite, and the Cue class doesn't have a Color element.
>
> --- On Mon, 2/8/10, Clay Benning <cl...@stoutpost.com> wrote:
>
>> Anyone know if it is possible to set
>> a color code for a cue via a script?
Ray
You can change the color via UI scripting too, although it's more
clunky, and harder to test since it relies on the UI elements to be
where they are expected. Beware of linebreaks and the usual problems
copying scripts from email. If you don't really need a script
solution, wait for official support. ;-)
This script changes the color of all the selected cue (you choose the
color from a list). You should be able to figure out how to modify
the script to itinerate through all the cue in a list, if it's q type
x then color it y.
~Stephen
set colorList to {"1 Cantaloupe", "2 Honeydew", "3 Spindrift", "4
Sky", "5 Lavender", "6 Carnation", "7 Licorice", "8 Snow", "9 Salmon",
"10 Banana", "11 Flora", "12 Ice", "13 Orchid", "14 Bubblegum", "15
Lead", "16 Mercury", "17 Tangerine", "18 Lime", "19 Sea Foam", "20
Aqua", "21 Grape", "22 Strawberry", "23 Tungsten", "24 Silver", "25
Maraschino", "26 Lemon", "27 Spring", "28 Turquoise", "29 Blueberry",
"30 Magenta", "31 Iron", "32 Magnesium", "33 Mocha", "34 Fern", "35
Moss", "36 Ocean", "37 Eggplant", "38 Maroon", "39 Steel", "40
Aluminum", "41 Cayenne", "42 Asparagus", "43 Clover", "44 Teal", "45
Midnight", "46 Plum", "47 Tin", "48 Nickel"}
set colorResult to choose from list colorList with title "Cue Colors"
with prompt "Select a Color" without multiple selections allowed and
empty selection allowed
if (colorResult is not false) then
set myColor to (word 1 of item 1 of colorResult) as integer
else
error number -128 --exit script
end if
tell application "QLab"
set WinName to q number of window 1
tell workspace 1
set mySel to selected
repeat with myCue in mySel
set playback position of current cue list to myCue
my colorCue(myColor, WinName)
end repeat
end tell
end tell
on colorCue(myColor, myWindow)
activate application "QLab"
tell application "System Events"
get system attribute "sysv"
if result is greater than or equal to 4144 then -- Mac OS X 10.3.0
if UI elements enabled then
tell application process "QLab"
repeat 6 times
key code 123 using {command down} -- left arrow Key
end repeat
if "Colors" is in (get name of windows) then
click button 1 of window "Colors"
end if
click color well 1 of window myWindow
tell window "Colors"
-- get description of UI elements
{"close button", "zoom button", "minimize button", "color well",
"group", "button", "toolbar", "toolbar button", "text", "grow area"}
tell tool bar 1
--get help of buttons
(* {"Color Wheel", "Color Sliders", "Color Palettes", "Image
Palettes", "Crayons"} *)
click button 5 (* to display "Crayons" *)
end tell -- tool bar
--get description of UI elements
(* {"group"} *)
tell group 1
get description of UI elements
tell group 1
--get description of UI elements
(* {"radio group"} *)
tell radio group 1
--get value of attribute "AXDescription" of UI elements
click radio button myColor
end tell -- radio group
end tell
end tell
click button 1 -- to close the Colors window
end tell
end tell
else
beep
display dialog "GUI Scripting is not enabled" & return & return &
"Open System Preferences and check Enable Access for Assistive Devices
in the Universal Access preference pane, then run this script again."
with icon stop
if button returned of result is "OK" then
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
end tell
end if
end if
else
beep
display dialog "This computer cannot run this script" & return &
return & "The script uses GUI Scripting technology, which requires an
upgrade to Mac OS X 10.3 Panther or newer." with icon caution buttons
{"Quit"} default button "Quit"
end if
end tell
end colorCue
--
Contact support anytime: sup...@figure53.com
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/fd2ee08c-86e0-4b93-a2b3-b3af30a31d0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/10763ae9-d9ba-4c0f-97db-50edc42142d1%40googlegroups.com.
You could put a script cue on the button that changed the color and starts another cue e.g an audio cue
Or
You could put a start cue on a button that starts a timeline group containing a script or network cue to change the button color and other cues e.g an audio cue
But....
If you are trying to emulate a cart player with lighty up buttons when a cue is playing then you have to work out how to change the color again when the cue finishes or when stopped either explicitly, or when ESC is pressed, which is trickier.
Mic