restart the script

42 views
Skip to first unread message

Kalman Tarr

unread,
Jun 26, 2022, 4:48:05 AM6/26/22
to QLab
Good Sunday Morning to everyone,

I told you several times I am not familiar in depths of Apple Script.
I have a NEW silly question.
I am using a script and a mistake checker in it.
Now I'm using the keyword 'return' to step out the script when the checker recognise a mistake.
But I would like to restart the script using 'go to' or 'jump' keyword to redirect the process to the starting point. But there is no the above keywords in script. No 'label' too.
What can I do if I stubbornly insist to jump to the starting point. I mean restart the whole script again.

This is the mistake checker:

        set miss to false
        set str_Miss to ""
        repeat with i from 1 to count listanswer
            if item (i) of listanswer is not in {"Fade", "Audio", "Video", "Memo", "Text", "Wait"} then
                set miss to true
                if length of str_Miss is 0 then
                    set str_Miss to str_Miss & item (i) of listanswer 
                else
                    set str_Miss to str_Miss & ", " & item (i) of listanswer
                end if
            end if
            set i to i + 1
        end repeat
        if miss is true then
            display alert str_Miss & return & ">Not EXPECTED< Cue Type(s) !" message "Please choose >EXPECTED< ones" as warning
            return
        end if

And this is the starting point

    set cues_Selected to (cues in current cue list) whose armed is true
    set count_Selected to count cues_Selected
    set cues_inList to ""
   
    repeat with eachCue in cues_Selected
        set q_type to q type of eachCue
        set off_Set to (offset of q_type in cues_inList)
       
        if off_Set is equal to 0 then
            set cues_inList to cues_inList & q_type & ", "
            --set notes of cue "47" to notes of cue "47" & q_type & ","
        end if
    end repeat
.............. etc

Hopefully is clearly described the problem I ask.
Any suggestions... pls

Best 
Kalman
Reply all
Reply to author
Forward
0 new messages