![]() $.(controller, 'appDidLaunch:', $.NSWorkspaceDidLaunchApplicationNotification, undefined) Start and then stop the screensaver and notice an alertĬode var me = Application.currentApplication() me.includeStandardAdditions = true.Run the applet by choosing 'Run Application' from the 'Script' menu.Save the script as an applet by changing the 'File Format' to 'Application' in the save panel and enabling the 'Stay open after run handler' option.From the pop-up near the top-left of the window, select JavaScript instead of AppleScript.Open the Script Editor app and create a new document.I also describe how this approach can be adapted to trigger an AppleScript script, which would produce the specific behavior described in the title of the question. Note: you will also need to DISable the preference to automatically OCR scanned documents in PDFpenPro, else you'll get that annoying dialog about language preference.In this answer I will show how to create a JavaScript for Automation (JXA) applet that listens for app-launch and screensaver-stop notifications and then displays an alert when it receives one, thereby producing the desired outcome described in the question. I'm sure it can be easily modified to export to other applications if you're not a Yojimbo user. If you save it as an application it also functions as a droplet. The following script accomplishes just that. My goal was to automate all of this when the Scan button is pushed on the scanner. Scan with Fujitsu ScanSnap > OCR with PDFpenPro > Export to Yojimbo I was inspired by this to create my own workflow which consists of the following steps: I hope this is of use to someone, and thanks to David and Michael for their excellent Applescripts. To implement, follow MacSparky’s excellent instructions. PDFpen Pro Users: Download The Text Script Here (Right-click and Save-As) PDFpen Users: Download The Text Script Here (Right-click and Save-As) On adding folder items to this_folder after receiving added_items Since both of these scripts were almost what I wanted, I decided to stand on the shoulder of giants and merge them together into this Applescript. ![]() ![]() One from David Sparks at MacSparky, which some users reported problems with in newer PDFPen versions, and one from Michael Tsai at C-Command Software which will OCR a document with PDFPen and send it to EagleFiler. PDFPen will also OCR PDFs to make them searchable, and I wanted a way to OCR a bunch of documents automatically with an Applescript, similar to what has been done with Adobe Acrobat and with ABBYY FineReader. However, that ability is not what this post is about. ![]() Among many other things, it lets you fill out and edit any PDF document on your computer and then print it out. It’s a little embarrassing filling out some official form with my chicken scratch, which is one of the many reasons why I love PDFPen. Normally this is not a problem, except when I have to fill out a form. I think my 5 year old son and I have pretty similar handwriting skills. I don’t know if it is because I have been glued to a computer since I was six years old, but my handwriting and printing is terrible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |