set userDuration to 5
set userCueNo to text
set userCueNo to text returned of (display dialog "Please enter the cue number/name to target" default answer "" with title "Start and Fade in target cue" buttons {"Cancel", "OK"} default button 2)
set userTarget to cue
set q number of userTarget to userCueNo --as cue
--set userTarget to cue
--set userTarget to userCueNo
tell front workspace
--set currentCue to last item of (selected as list)
make type "Start"
-- set newCueStart to selected last item of (selected as list)
set mySel to selected
set newCueStart to last item of mySel
set cue target of newCueStart to userTarget
--set playback position of current cue list to last item of selectedCues
--make type "Fade"
--set newCueFade to last item of (selected as list)
--set cue target of newCueFade to userTarget
--set duration of newCueFade to userDuration
--newCueFade setLevel row 0 column 0 db -40
end tell
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
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.
For more options, visit https://groups.google.com/d/optout.
Richard Bell email: richard...@gmail.com web: www.argyllrb.co.uk
Thanks all for your replies. I'm afraid I confused my original question slightly, as Rich pointed out, by referring to q number when I meant cue target. Anyway I tried the syntax Rich gave me but I'm still getting a (slightly different) error. Below is the barebones version of the script I'm trying and the error it's throwing:
set userCueNo to string
set userCueNo to text returned of (display dialog "Please enter the cue number/name to target" default answer "" with title "Start and Fade in target cue" buttons {"Cancel", "OK"} default button 2)
tell front workspace
make type "Start"
set newCueStart to last item of (selected as list)
set cue target of cue newCueStart to cue userCueNo
--set cue target of newCueStart to cue "testCue"
Richard Bell mobile: +44 (0)7759 263006 email: richard...@gmail.com web: www.argyllrb.co.uk