OS X Lion Applescript to open Preview and search

Posted on 2011-10-26
Last Modified: 2012-05-12
I need a simple Applescript that will tell Preview to open, open Find, place the cursor in the field, and copy clipboard content (assuming it exits but not testing) to the search field. After the Find, I need another script or additional step in the same script to open and switch to Adobe Reader. After that, I can end tell but don't know AS well enough.
Question by:MarkJulie
    LVL 15

    Accepted Solution

    Have you thought about using Automator for this task?  It generates the AppleScript automagically for you as you drag and drop components.

    Open Automator: choose Workflow and take a look at the PDFs components and the "Files and Folders" components and possibly the Photos components.

    I am not sure I understand exactly what you are trying to do; but may be able to help further with a little more explanation.

    There is an Open Preview component; Get Contents of Clipboard; etc..

    there is also a Record button so that you can record your actions and use this as a basis for your script.

    Assisted Solution

    Ultimately, I need the AS as a script to call from within FileMaker, so Automator is a logical choice. It just doesn't suit the need unless I can record and convert to script. Can that be done, and, if so, how?

    Author Closing Comment

    Partially answered with steps of process lacking.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    As a Mac user and former AppleCare AHA & Senior Advisor, I'm constantly bombarded with questions about Macs and if they need Antivirus. This short article is my response to those questions.
    Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now