tell application id "com.figure53.QLab.5" to tell front workspace
try
set theCue to cue (text returned of (display dialog "Cue Number?" default answer ""))
set the duration of theCue to 24
on error
display dialog "The cue doesn't exist!"
end try
end tell
But this would be a fairly unusual way of doing things, as it would seem to require you to have committed all the cue numbers in a workspace, and what they do to (brain) memory for it to be useful.
What exactly are you trying to achieve with a script , that would be quicker than just editing the cue?
Mic