Avoid having to select "Include Network Devices" every time when scanning in Preview
Solution 1:
That answer is very well done, but an even better option is to use "image capture".
Solution 2:
tell application "Preview"
activate
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: