Using clipboard as token

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Using clipboard as token Tue May 12, 2020 4:49 am • by Scorch2
Hello there,
I'm running an OCR script on an images folder. It copies the result to the Clipboard.
I wonder if there is way to edit the comment of the file with my clipboard result?
Scorch2
 
Posts: 2
Joined: Wed Oct 09, 2019 8:57 am

Re: Using clipboard as token Tue May 12, 2020 10:11 am • by Mr_Noodle
That's not doable unless you are using a script. It's also not a good idea to use the clipboard for this. Can you describe in more detail what you are trying to do?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Using clipboard as token Tue May 12, 2020 10:16 am • by Scorch2
I download images in a folder.
i want to OCR every image in the folder and automatically apply the OCR text to the comment section of the file like shown in the screenshot.
https://cln.sh/vcEb
Scorch2
 
Posts: 2
Joined: Wed Oct 09, 2019 8:57 am

Re: Using clipboard as token Wed May 13, 2020 9:38 am • by Mr_Noodle
You want to apply the whole text of the document to the comments? Hopefully that content is short.

You want to use match patterns in this case. Look them up in the manual. Use a custom attribute to grab all the text and use that attribute in an Add Comment action.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Using clipboard as token Mon Nov 06, 2023 1:13 pm • by DaudelinPhoto
Hi,

I'm new to this software. I'm searching for a way to add the clipboard content to a file name. What I would like to do is :

- When a file is saved in a watched folder, it is renamed to "Clipboard content" - "Original name of the file".jpg, for example.

I'm trying to find a way to do it but not sure if one of the tokens can do this from what I saw.

Why I want to do that? Let's say I shoot multiple people and I have a list. I would like to send the files via iPad to my home computed and that the watched folder on the home computer renames it with the name of the person in the photo. Of course, I'll have to find a way to share the clipboard content remotely from iPad, but that is not my concern for now.

If I wanted to shoot with a tethered laptop, I could do it directly in Capture One as they have a clipboard content token. But I don't have laptop so trying to find a way to do it another way.
DaudelinPhoto
 
Posts: 2
Joined: Mon Nov 06, 2023 1:07 pm

Re: Using clipboard as token Tue Nov 07, 2023 9:31 am • by Mr_Noodle
Have you tried the suggestions above?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Using clipboard as token Tue Nov 07, 2023 11:35 am • by DaudelinPhoto
Mr_Noodle wrote:Have you tried the suggestions above?


Thank you for the suggestion. I just did. But I'm sorry, I'm not that good. The content I want to paste at the beginning of the file name will be copied from a website and not a file. It seems like the matched patterns need it to be from a file?

I might not even be at the same location as my computer when I do, so I'll need to figure out how to use a universal clipboard from iPad to my remote Mac, too, but that is another story and I'm pretty sure I can figure it out.

Do you think I would I would need to use a script for that?

EDIT : I think I am close as I can create and automator quick action "Get clipboard content" but I'm still trying to figure out how to put it in front of the name of the file in Hazel
DaudelinPhoto
 
Posts: 2
Joined: Mon Nov 06, 2023 1:07 pm

Re: Using clipboard as token Wed Nov 08, 2023 11:47 am • by Mr_Noodle
You need to use AppleScript to deal with the clipboard. You can export custom attributes from AppleScript back to Hazel and then use that custom attribute in patterns in Hazel.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron