jmm28260
Member-
Posts
26 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Everything posted by jmm28260
-
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
@CJK Thanks so much for this terrific job. I really appreciate your time and efforts. After getting your last version, I ran it and I think something was deleted in your procedure, since it produced no file at all. I have included it also in my Automator workflow, and all the actions preceding the Applescript got results, but nothing came out of the script. No results shown. https://www.dropbox.com/sh/q8rp4cs8lmi7zb4/AADpmmhTSHL4wqNLldH6fuSla?dl=0 Would you mind checking it ? -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
@CJKThanks a lot. I changed file, and it seems to be working now. I really admire your competence and your tenacity! One last thing that is strange: when I feed the script with italian text, I may get .en with some files or rightfully so, .it. Apparently its detection of italian is erratic ... I guess that has nothing to do with the script. Again, thanks a lot and great job!! -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
-
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
-
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
@CJKHi again, I do understand your sighs ;)) but unfortunately the game does not seem over ... Here is a new error message, after fixing the previous one as indicated. I always test with different pdf to make sure the error does not come from the file. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
-
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
@CJK -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
@CJK Thanks so much for your efforts. I am impressed by your work and thank you for your time. I have tried using the Script editor in Mojave with your Applescript and here is the error message I get : And I have used the Automator you provided following your instructions precisely, specified a definite directory to look into, where I had put a pdf file, and got the following message: L’action « Exécuter un script AppleScript » a rencontré une erreur : « *** -[__NSDictionaryM setObject:forKey:]: key cannot be nil » Looks like Mojave is reluctant to accept some instructions. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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... -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
Here we go: https://www.dropbox.com/sh/6grp8odam5y076i/AABogVAk7WmSUUapIfu02Tv3a?dl=0 -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
-
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
-
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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 ? -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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 -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
Thank you again for your time. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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 ? -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
I was hoping to automate the pdf text language identification. Would Applescript be able to do it ? Thanks for your time and efforts, anyway. -
Workflow to identify language in pdf
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
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. -
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.
-
Unfold or fold all folders and subfolders in directory
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
Thanks a lot deanishe. You solved my problem. It's a great and elegant solution. -
Unfold or fold all folders and subfolders in directory
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
You are perfectly right, thank you. The point is that I would like it to be included in a wider procedure and therefore be done automatically without my intervention. I wanted it to be automated via Alfred, Automator or Applescript. Does it make any sense to you or am I confusing in my description ? Thank you for your time. I appreciate. -
Unfold or fold all folders and subfolders in directory
jmm28260 replied to jmm28260's topic in Workflow Help & Questions
Thank you deanishe for your answer. My purpose would be to expand (not open) ALL folders and subfolders in the directory, and subsequently, to reduce all of them. Am I clear in my explanation ? I know that I could click on the triangle, but I would like a workflow to take care of the procedure for all the folders and subolders.