This is what I was referring to not being wise…
<img width="50%" src="file:///Users/rob/Databases/CCA.dtBase2/Files.noindex/png/7/Screenshot%202023-11-13%20at%208.44.42%20AM.png">
This is what I was referring to not being wise…
<img width="50%" src="file:///Users/rob/Databases/CCA.dtBase2/Files.noindex/png/7/Screenshot%202023-11-13%20at%208.44.42%20AM.png">
Right, that’s the screenshot image file that was imported via drag-n-drop. If I could get a base64 encoded string, I would use that instead.
I implemented a couple AppleScripts to make it fast to combine my annotation link with my screenshot, and then insert it into the HTML file, but ultimately I wasn’t able to overcome certain limitations and so I think that my best option for a good workflow is to simply add screenshots to RTF files with my annotation links next to them.
I can’t find any easy way to construct the image link elements and quickly insert them into the HTML file. The best I can do is auto-fill the URL field on my image files (taking the value of whatever is in the system clipboard), then auto-generate the HTML code, and manually paste it into my HTML file using an external editor. I was hoping for a process that would be a lot faster.
I was hoping for a process that would be a lot faster.
You’re creating something specific to your desires and situation, inventing something out of whole cloth as it were. So there’s no built-in mechanism for what you’re doing and it’s the first such request we’ve had.
But as a reminder, using an absolute path of an item in a database’s internals as the src link – file:///Users/rob/Databases/CCA.dtBase2/Files.noindex/png/7/Screenshot%202023-11-13%20at%208.44.42%20AM.png">
is not a good idea.
What you are attempting would be eminently useful.
I would wholeheartedly encourage you to dig in to Applescript and/or Javascript for Automation (JXA) - you will find tons of support on this Forum and in the Automators Forum. Keyboard Maestro is an essential tool in the toolbox too.
It’s an immensely worthwhile journey and you will no doubt discover many other use cases where automation can help your workflow. But it’s not a “quick” process.
I think learning to script or learning to code makes sense if it is intrinsically “in your DNA” - something you click with and inherently enjoy. If that’s not you or if you don’t have the time, then if this is a workflow for business purposes you could fairly easily find a freelance developer to create a script such as you are seeking.
Or you can do a combination as I have done - I used to be a developer many years ago but only have time now for stuff I can do in a few hours- beyond that I have hired freelance developers for stuff that is important enough to help with the work that pays the bills.
Right. I’m actually a professional developer. My issue is the availability of time.
I see that DT can also run JavaScript, which is pretty handy.
But according to ChatGPT (it could be wrong, I haven’t checked), the challenge is with the current limitations of the various API’s involved.
I was hoping DT would allow me to capture the annotation link of whatever PDF annotation is currently selected when the script is run, but this is not supported?
To generate the HTML element and insert is challenging. Simply forming the HTML snippet is not enough because when we paste into an HTML file in DT, it will paste the code as raw text, not as an HTML element. So we need to either find a way to format the clipboard data as HTML document data that DT will recognize, or come up with some other workflow that doesn’t involve the system clipboard. I’m presently at a loss for other ways to do this.
To make this work, I will probably have to turn to some native macOS language like Swift and build a standalone app that implements the screen capture bounding box functionality, then generates an HTML element, and writes it to the system clipboard.
To get the PDF annotation link, I will have to use the DT menu to first copy it, and then when I run my tool, it would read the clipboard data and write that value into the HTML element it generates.