Hey there,
I have a workflow that is about setting up work for projects. On the top left of my screen I have Finder open with my client folder and the right half of my screen is a Finder window with the files I’m working from. There are many steps to this process that I would like to tackle but I’m starting with one at a time.
I’m trying to write an AppleScript that copies the selected files (from my client window) to the Finder window on the right side of my screen. I used:
tell application “Finder”
get bounds of front window
end tell
to get: {855, 43, 1710, 1112}
Then I tried this script:
But nothing happens. Can anyone enlighten me on my mistake?
Thanks,
Thomas
Why define the Finder window by both number and bounds?
If the finder window moves the slightest bit that will no longer work.
Might a better solution be to define by name a folder that you use for this purpose?
This would likely be a really easy and robust automation for Hazel.
Perhaps first define the problem you are trying to solve before presenting a possible solution.
As @rkaplan noted, there may be a better tool for this task.
Good points. I tried removing the number and only define by bounds as you can see. The bounds are set by a KM macro that sets up my workspace. The bounds I get are slightly different (top is 25 as opposed to KMs 00, but that makes sense)
The reason I can’t use Hazel for this is twofold:
- The name of the target folder changes per project and subproject
- I can’t trigger the Hazel-command at will, it will run when it sees files. I need to be able to take in the subprojects as I’m ready to work on them.
Would there be other tools better suited for this?
To add to what’s already been suggested, let’s take another step or two back.
Your idea to just focus on one step at a time is a good one, but if you can share your overall workflow for what you want to do, this might well help in further suggestions as it will help us to understand bother the overall what and the why.
It reads like you are setting up a project, but not from a template - rather by duplicating existing client files you are manually selecting. This feels a little off to me, but we’re only getting a peek at one or two pieces of the puzzle. I would expect more automatable elements to this to avoid much in the way of manual selection.
Can you give us a high level walk through of your overall goals and any constraints and requirements?
Thanks for the replies, I’ll back up and explain in full:
I work on music for films and I need to deal with multiple clients with different formatting delivering cues (pieces of music) that are placed in the film.
I create projects from templates so that all films have a “CUE” folder ready with the subfolder “Audio”, “Demo”, “Old” and “PDF”. The project folder lives on my Dropbox. What they all have in common is that they are named “_YY-Client Initials-Project name”. A project can take anything from a day to a month and consist of 2 cues or 60, so I’m looking for a solution where I don’t have to set up separate automations per project but rather have KM or Shortcuts execute them at my will.
The window setup is identical to all projects: My local folder is always right half and client folder is always top left quarter. I can’t have Hazel do this automatically because 1) sometimes Google Drive* hasn’t downloaded all files 2) not all cues are mine to take.
Here is a screenshot of a sample project that has been delivered and archived, but I want to:
- duplicate CUE in the window to the right and rename it according to the selected Finder folder on the left.
- take contents of folder 2M10 from the left and copy it to newly created Finder folder on the right, to the Audio subfolder that exists already.
- Label newly created 2M10 folder “Yellow”
- Open the Finder window on the right to the “Audio” subfolder in the newly created 2M10 folder. If possible, have the .mid file selected.
- Append “2M10” to the Draft “Aktuelt film cue”
If some of this is at all possible, it would be of great help.
I have Hazel, KM, Alfred and some of the other usual automation suspects available.
*I don’t decide what cloud service to use.
Ok, I’m getting somewhere ![:slight_smile: :slight_smile:](https://talk.automators.fm/images/emoji/apple/slight_smile.png?v=12)
I’ve gotten this KM macro to work. I have to open the folder I want to copy from, but then it copies the folder name to the clipboard, opens a save dialog box (with Default Folder X it’s easy for me) and then runs the shortcut to basically append with markdown to the drafts note.