How could I do the following:
- Encrypt the most recently added file to ‘Downloads’ using a password named ‘2qau4’
- Then attach that File to KM Mail action
How could I do the following:
Please see my post here. You have to specify the program you are using to encrypt the file. Otherwise it’s almost impossible to help you to build a macro.
See the hints given here. You have said “I know how to attach files in KM Mail”. So, what is the specific problem?
Just an idea: Build a macro along the lines you think it should work out. Post it here for review.
Thank you for your response, I would want to ZIP the file with a particular password for cross platform use.
Not sure how to upload the image of the macro but I have put it here instead.
I’m in vacations right now, without any Mac (fortunately ;)), so I cannot open your macro.
I hope someone else will have a look at your macro.
For the moment so much:
Be careful with ZIP encryption. The original ZIP encryption is/was known to be very easily crackable. I don’t know if this is fixed in recent versions. Since I still don’t know which program you are using to create the archive you have to research if the encryption used by the particular program is secure.
As already mentioned, I recommend the 7zip program. As far as I know its encryption is secure, and you can also create ZIP archives with 7zip. (For maximum compatibility don’t use the deflate64 option.)
Search the forum for something like “upload macro screenshot” or have a look at the KM Wiki (the article isn’t hard to find).
Unfortunately I’m back from vacations
I can’t help you much with your Daylite AppleScripts, since I don’t know that app nor its AS dictionary. The scripts seem a bit strange to me, but I guess you have run them in Script Editor before pasting them to KM.
This macro will create an encrypted Zip archive from a given file path (stored in the first variable):
You see two Shell Script actions, one disabled and the other one enabled. The enabled one uses strong AES256 encryption, the disabled one uses the weak ZipCrypto encryption.
Of course, the AES encryption is preferable, but you have to find out if your recipients’ Zip unarchivers are compatible with it. For example, on the Mac the AES-encrypted archives cannot be opened with the macOS standard Archive Utility.app (but they open fine with The Unarchiver). I don’t know the situation on Windows or Linux.
The weaker ZipCrypto encryption should be widely compatible.
The reference for the available 7zip switches is here.
The macro is using a password stored in a variable, that means the password gets written to disk in clear text. This shouldn’t be a problem, since you probably have the clear-text attachments also on disk. But do not use the macro with a password that you are also using for other, more important stuff (for example your LastPass/1Password master password)!
For the macro to work you need to have…
brew install p7zip)
Hope this helps!