Forum Moderators: travelin cat
To clarify further, I know it's not possible to control the printer through the web site/page itself. If it's possible at all, it would be software based on each machine or controlled through a print server (if you have one setup.)
I don't understand all the lpr stuff, but a man lpr in terminal sure makes it look possible.
tell application "Safari"
set this_URL to the URL of document 1
if this_URL contains "special_color_directory" then
display dialog "color printer"
-- insert lpr shell script targeting color printer here
else
display dialog "black and white printer"
-- insert lpr shell script targeting b&w printer here
end if
end tell