Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dkaiser

macrumors newbie
Original poster
Nov 29, 2017
8
0
Hi i have tried a lot but my brain is not to complex to solve the puzzle. hope there is a clever mind in here that just say x2c cYx (=(=?=) solved ;)

okay let me try to explain.

i have x amount of names in a list.

I only need to do changes in some of the names in the list (so when a specific name is selected it stops, and I set some automation in, and when I run through the names in the list it need to remember not to stop at that name again.)

challenges:
I can only get info by "return key" and "CMD+C" to see name through the clipboard
the only way to get to down of the list is to arrow down
the only way to see you are at the button of the name list is to see that the names are not changing when going down (arrow down)

i want to run the code paste some automation in and when I make the script to run the code again it stop at the next name in the list, offcoruse I only run the script once and it remembers in the "global string" or some smart way.

my failed attempt error -25130


Code:
global keywords
global ens
tell application "Final Cut Pro" to activate
set ens to ""
set keywords to {}
repeat while (the clipboard) is not equal to ens
    set ens to the clipboard
    test()
end repeat

on test()
    tell application "System Events" to key code 36
    delay 0.1
    tell application "System Events" to keystroke "c" using command down
    delay 0.1
    set end of keywords to the clipboard
    delay 0.1
    tell application "System Events" to key code 36
    delay 0.1
    tell application "System Events" to key code 125
end test

set newList to {}

repeat with fruit in keywords
    if newList does not contain contents of fruit then copy (contents of fruit) as text to end of the newList
end repeat
set keywords to newList




--*************************************************************************************

repeat with fruit from 1 to (count keywords)
    --display notification fruit
end repeat
repeat fruit - 1 times
    tell application "System Events" to key code 126
end repeat
--*************************************************************************************




on VaelgKeyword()
    set remember1 to ""
    set RigtigForkeret to false
    repeat while remember1 is not equal to (the clipboard)
        set CameraNames to {"CAM_A", "GoPro", "Forrude", "Tag", "Kabine_Forfra", "Kabine_Over_Skulder"}
        tell application "Final Cut Pro" to activate
        set remember1 to the clipboard
        delay 0.4
        tell application "System Events" to key code 36
        delay 0.4
        tell application "System Events" to keystroke "c" using command down
        set MarkeretNavn to the clipboard
        delay 0.4
        
        tell application "System Events" to key code 36
        delay 0.4
        repeat with i from 1 to count CameraNames
            if MarkeretNavn contains item i of CameraNames then
                            --ops start fjerner brugt name fra array
                set hvad to the clipboard
                set itemsToDelete to {hvad}
                
                set cleanList to {}
                
                repeat with i from 1 to count CameraNames
                    if {CameraNames's item i} is not in itemsToDelete then set cleanList's end to CameraNames's item i
                end repeat
                
                set CameraNames to cleanList
                --ops slut fjerner brugt name fra array
                set RigtigForkeret to true
                exit repeat
            end if
        end repeat
        display notification RigtigForkeret
        if RigtigForkeret is true then
            
        else
            tell application "System Events" to key code 125
            delay 0.4
        end if
    end repeat
end VaelgKeyword

VaelgKeyword()
 
I have to admit... I understood ****-all of what you were trying to do and what goes wrong.

You want to paste in clips from Final Cut, change the keywords on the clip if it matches something else and then move on?

Also... Danish or Norwegian?
 
I have to admit... I understood ****-all of what you were trying to do and what goes wrong.

You want to paste in clips from Final Cut, change the keywords on the clip if it matches something else and then move on?

Also... Danish or Norwegian?
Hi yeah, im Danish :)

no but almost. when I import clips I get the correct keywords from the folders they are in, assigned to the right clips. (keywords = my name list)
so the thing im trying to do, is to make a script that looks on my keywords and give the keyword to the clips a metadata tag as camera name called GoPro for all GoPro clips for example.
 
I have to admit... I understood ****-all of what you were trying to do and what goes wrong.

You want to paste in clips from Final Cut, change the keywords on the clip if it matches something else and then move on?

Also... Danish or Norwegian?
Solved it. , damm I guess it the heat
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.