In QLab 5.1.1 you no longer need to use ExifTool as you can now query cue size width and heights which return a single number,
/cue/X/notes #/cue/selected/cueSize/width#
/cue/Y/notes #/cue/selected/cueSize/height#
To get the results of these queries you do need actual network cues (rather than shell scripts to port 53535,) which can also store the returned dimensions in their note fields. These use /cue/selected in the address, so the script needs to actually select the cues rather than just reference them in the repeat loop.
The amended script is:
--QLab 5. Assign different video stages depending on orientation
--doesn't work in Always Audition mode!!!!
-- check your stages have these names or change these names to match your stages (No spaces or OSC illegal characters allowed in these stage names)
--requires 2 network cues numbered X and Y with OSC queries /cue/X/postWait #/cue/selected//cueSize/width#. and /cue/Y/postWait #/cue/selected//cueSize/height#
set portraitStageName to "portraitStage"
set landscapeStageName to "landscapeStage"
tell application id "com.figure53.QLab.5" to tell front workspace
set theSelected to (selected as list)
repeat with eachcue in theSelected
if q type of eachcue is "video" then
set the selected to eachcue
delay 0.01
start cue "X"
start cue "Y"
delay 0.01
set x to notes of cue "X" as integer
set y to notes of cue "Y" as integer
if x is greater than y then
set theStageName to landscapeStageName
else
set theStageName to portraitStageName
end if
set eachID to uniqueID of eachcue
do shell script "echo '/cue_id/" & eachID & "/stageName " & theStageName & "' | nc -u -w 0 127.0.0.1 53535"
end if
end repeat
end tell
Screen recording attached
MIc