tell application "Preview"
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
click menu item "Printer name"
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: