I set up a wireless HP Printer for my mother, prints and scans just fine. The annoying thing is that every single time we try to scan in Preview, we first have to do the following:

  1. Select File > Import from Scanner > Include Networked Devices
  2. Select File > Import from Scanner > Printer name

Is there a way to avoid having to do that first step every time? Didn't see a preference in Preview and obviously we aren't going to keep it running all of the time. :)

2 Answers 2


That answer is very well done, but an even better option is to use "image capture".

tell application "Preview"
end tell

tell application "System Events"
    tell process "Preview"
        tell menu bar 1
            tell menu bar item "File"
                tell menu "File"
                    tell menu item "Import from Scanner"
                        tell menu "Import from Scanner"
                            click menu item "Include Networked Devices"
                            -- added a delay because the list of networked printers doesn't appear immediately. AH 11/21/11
                            repeat until menu item "Printer name" exists
                            end repeat
                            click menu item "Printer name"
                        end tell
                    end tell
                end tell
            end tell
        end tell
    end tell
end tell

To use this, copy the script, open the the Script Editor application under /Applications/AppleScript/, and paste into a new script. I am going to guess that click menu item "Printer name" will have to be changed as I don't think the menu item really says "Printer name", I'm guessing it says something like "HP OfficeJet 6500". Make sure that all menu names match.

Save the script as either an application, which can be launched from the dock, or a script, which can be run from the AppleScript menu bar item.

Note, I believe that you must enable "Enable access for assistive devices" in the "Universal Access" preference pane of System Preferences for this to work:

Enable access for assistive devices


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .