set taktListe to {{"00:00:06:00", "1"}, {"00:00:08:12", "2"}, {"00:00:11:00", "3"}, {"00:00:13:12", "4"}}
set userTakt to text returned of (display dialog "Welchen Takt möchtest du laden?" default answer "")
set gefunden to false
repeat with eintrag in taktListe
if item 2 of eintrag is userTakt then
set timecodeOriginal to item 1 of eintrag
set mm to text 4 thru 5 of timecodeOriginal
set ss to text 7 thru 8 of timecodeOriginal
set zz to text 10 thru 11 of timecodeOriginal
set konvertierteSekunden to ((mm * 60) + ss) + (zz / 100)
set gefunden to true
exit repeat
end if
end repeat
if gefunden then
display dialog "Timecode " & konvertierteSekunden & " wird geladen."
tell application id "com.figure53.QLab.4" to tell front workspace
set currentCue to last item of (selected as list)
load (currentCue) time konvertierteSekunden
end tell
else
display dialog "Takt nicht gefunden."
end if
tell application id "com.figure53.QLab.4" to tell front workspace
set currentCue to last item of (selected as list)
set taktListe to (notes of currentCue as text)
set takListe_N to q number of currentCue
set userTakt to text returned of (display dialog "Welchen Takt möchtest du laden?" default answer "")
set gefunden to false
set timecodeOriginal to paragraph userTakt of taktListe
set mm to text 4 thru 5 of timecodeOriginal
set ss to text 7 thru 8 of timecodeOriginal
set zz to text 10 thru 11 of timecodeOriginal
set konvertierteSekunden to ((mm * 60) + ss) + (zz / 100)
set gefunden to true
if gefunden then
display dialog "Cue " & takListe_N & " Timecode " & konvertierteSekunden & " wird geladen."
load (currentCue) time konvertierteSekunden
else
display dialog "Takt nicht gefunden."
end if
end tell
set theTids to AppleScript's text item delimiters
set AppleScript's text item delimiters to tab
tell application id "com.figure53.QLab.4" to tell front workspace
set currentCue to last item of (selected as list)
set taktListe to (notes of currentCue as text)
set takListe_N to q number of currentCue
set userTakt to text returned of (display dialog "Welchen Takt möchtest du laden?" default answer "")
set gefunden to false
repeat with i from 1 to (count of paragraphs of taktListe)
set theBar to text item 1 of paragraph i of taktListe
if theBar is userTakt then
set timecodeOriginal to text item 2 of paragraph i of taktListe
set mm to text 4 thru 5 of timecodeOriginal
set ss to text 7 thru 8 of timecodeOriginal
set zz to text 10 thru 11 of timecodeOriginal
set konvertierteSekunden to ((mm * 60) + ss) + (zz / 100)
set gefunden to true
exit repeat
end if
end repeat
if gefunden then
display dialog "Cue " & takListe_N & " Takt " & theBar & " Timecode " & konvertierteSekunden & " wird geladen."
load (currentCue) time konvertierteSekunden
else
display dialog "Takt nicht gefunden."
end if
end tell