Jump to content

jmm28260

Member
  • Content Count

    18
  • Joined

  • Last visited

  1. jmm28260

    Workflow to identify language in pdf

    Problems between Mojave and Applescripts are cited all over the net. I tried to find some explanations on the web and here are 2 possibilities that might help: https://www.jessesquires.com/blog/executing-applescript-in-mac-app-on-macos-mojave/ https://www.felix-schwarz.org/blog/2018/07/apple-event-sandboxing-in-macos-mojave I also found a possible answer that was suggested on a forum and that might work: This worked for me, but it requires converting to an app first! 1. Open the app's plist file is xcode 2. add row (from right click context menu) 3. in ‘key’ column select ‘Privacy - AppleEvents Sending Usage Description’ from the drop down menu (you need to scroll down) 4. add ‘This script needs to control other applications to run.' in the value column. 5. Build the application again... it should now prompt for accessibility and automation permissions. Hope it helps...
  2. jmm28260

    Workflow to identify language in pdf

    Indeed, Mojave might be the source of the problem; since I updated my Os, several of my Automator workflows do not work anymore. But in this case, the workflow rolls fine; all the actions are performed and green-checked. The only issue that I see, is that the Applescript gets a .txt file and results with the same file and not a .pdf file with the lang appended to the name. My guess is that Mojave does not accept and treat the Applescript as it should. I might have to wait for Apple to correct that problem with its future updates. However, I really want to thank you for all the time you have devoted to my problem.
  3. jmm28260

    Workflow to identify language in pdf

    Here we go: https://www.dropbox.com/sh/6grp8odam5y076i/AABogVAk7WmSUUapIfu02Tv3a?dl=0
  4. jmm28260

    Workflow to identify language in pdf

    Sorry for that. My mistake, I sent you the wrong workflow. But the problem remains as you can see:
  5. jmm28260

    Workflow to identify language in pdf

    Here is the link: https://www.dropbox.com/sh/t0kw204fgnc5948/AACZn0__tuEwjFfHXvWzyzmHa?dl=0 And again, many thanks for your time and efforts. I really appreciate your assistance.
  6. jmm28260

    Workflow to identify language in pdf

    My Mac Os is 10.14.2 I removed the lines with try and end try and followed all your instructions. All actions get results, but they are all with the .txt file. No pdf file appears in any action results except for the first one. And I don't get any pdf file in the directory mentioning the language when the workflow is completed. The last result is the .txt file without mention of the language. I did not change anything, except for the directory and they keep the same location. Hope this helps.
  7. jmm28260

    Workflow to identify language in pdf

    Here is the message I get when I try to run it:
  8. jmm28260

    Workflow to identify language in pdf

    Waouh! You've done a terrific job! Thanks so much; I really appreciate your help. I've run the workflow, it works fine, but unfortunately, the name comes out unchanged, without the language specification. I'm sure you've checked it, so is there something I missed ?
  9. jmm28260

    Workflow to identify language in pdf

    Thank you so much for your time and efforts. I tried your Applescript on a pdf file, and it didn't work. I guess I probably messed it up. What I am trying to do, is have the workflow read the page, get the title, and add to it the resulting text of your Applescript, i.e.Title +EN if the text is english or +FR if it is in french for instance. At the following link you will find the messed up Automator workflow. If you have a minute, can you help ? Many thanks. https://www.dropbox.com/sh/uno2vet0doe7t0b/AAAlwDqqlzkeOMT0b7dNIEOTa?dl=0
  10. jmm28260

    Workflow to identify language in pdf

    Thank you again for your time.
  11. jmm28260

    Workflow to identify language in pdf

    Here is the Applescript I use: try tell application "FineReader" activate open theFile tell application "System Events" tell process "FineReader" tell menu bar 1 tell menu "Document" tell menu item "OCR Text Recognition" tell menu 1 click menu item "Recognize Text Using OCR..." end tell end tell end tell end tell keystroke return end tell end tell save the front document close the front document close application "FineReader" end tell end try Can I add a few lines to extract the metadata and identify the language ?
  12. jmm28260

    Workflow to identify language in pdf

    I was hoping to automate the pdf text language identification. Would Applescript be able to do it ? Thanks for your time and efforts, anyway.
  13. jmm28260

    Workflow to identify language in pdf

    The file is handled through an Automator workflow, and after OCR I would like its language to be identified and flagged accordingly to be later dispatched to the appropriate folder.
  14. I am trying to automate language recognition of OCR'eds pdf in order to flag the file accordingly. Would Alfred be able to face the challenge with a workflow ? Any help welcome. Thanks.
  15. Thanks a lot deanishe. You solved my problem. It's a great and elegant solution.
×