Skip to main content

How do you use the new "move inside" command?

Comments

7 comments

  • Jim_DK
    Hi

    Can you post a more complete example? - it is hard to determine your issue without seeing how you are addressing the objects.
    0
  • RickDT
    Sure thing, here's the simplest possible POC:

    tell application "Capture One 11"
    set aVar to variant 1 of collection 1 of current document
    set aCollection to collection 6 of current document -- 6 is a regular album I set up as a Test destination for moving variants
    log "" & name of aVar
    log "" & name of aCollection
    tell aVar to move inside of aCollection
    end tell


    When I run this code, I get Some parameter is missing for move inside.. How should I be using that command?
    0
  • Jim_DK
    Ok. I can see why this might be troublesome 😊 DIctionary explains some of the issues:

    1. Move inside is for favorites and folders and is a physical file on disk move. So, If an album (as album is just references) you need to use "add inside" (adds instance)
    2. Move inside expects a list, even in this case for a list of 1 - so put aVar in {}

    Something like the below (in my example this is a session and moves files from the Capture folder to the 8th collection which happens to be a favorite) now works. Just another tip, when sending loads of messages to the same object (or its objects), it reads easier to wrap the code in question in another tell - you can wrap everything in a tell current document and then remove all the other references to current document.

    tell application "Capture One 11"
    tell current document
    set aVar to variant 1 of collection 1
    set aCollection to collection 8 -- 8 is a fav in my current document so works for this example.
    log "" & name of aVar
    log "" & name of aCollection
    move inside aCollection variants {aVar}
    end tell
    end tell
    0
  • Rick Allen
    How do I set a posix path as the destination? Or does it need to be a collection first?
    *this is taken from a much larger script so might not make sense?? 😊

    tell application "Capture One 11"
    set SessionPath to folder of current document as string
    set SkuFolderName to "SkuFolderName"
    tell current document
    set aVar to variant 1 of collection 1
    set newFolder to quoted form of (POSIX path of (SessionPath & "Capture:" & SkuFolderName & ":")) as string
    do shell script "/bin/mkdir -p " & newFolder
    move inside newFolder variants {var} --fails
    end tell
    end tell
    0
  • Sean Murphy
    Hey Rick,
    Looks they need to be a collection first. If you don't mind creating Favorites for each of the SkuNameFolders you can use these three lines of code between the ########s:


    tell application "Capture One 11"
    set SessionPath to folder of current document as string
    set SkuFolderName to "SkuFolderName"
    tell current document
    set aVar to variant 1 of collection 1
    set newFolder to quoted form of (POSIX path of (SessionPath & "Capture:" & SkuFolderName & ":")) as string
    do shell script "/bin/mkdir -p " & newFolder
    #######
    set newFolderHFS to SessionPath & "Capture:" & SkuFolderName & ":" as alias

    make new collection with properties {kind:favorite, file:newFolderHFS}
    set collectionName to collection SkuFolderName
    #######
    move inside collectionName variants {aVar}
    end tell
    end tell
    0
  • Sean Murphy
    Did you perhaps reply to the wrong message? No Netgear involvement here.
    0
  • John Doe
    [quote="SeanMurp" wrote:
    Did you perhaps reply to the wrong message? No Netgear involvement here.

    It's just one of many spam messages that get posted now and then on this forum. Please ignore.
    0

Please sign in to leave a comment.