safari url printing

I’m trying to build a VERY simple piece of applescript that uses osasubr (macos X unix program → http://www.turbozen.com/mac/osasubr/) that passes two agruements (a *.URL file and the string printer name safari should print to). All of this done in the background hidden from the user without interfering (closing) any other open safari windows running on OS 10.3 or higher.
After trying to teach myself some applescript to do it, it just doesn’t seem to work at all
Any help/ideas/code?
Thanks
Mike

This is what I have so far:


on print {URL, printer1}
	tell application "System Events" to set web_running to exists process "Safari"
	tell application "Safari"
		tell application "System Events" to if not web_running then set visible of process "Safari" to false
		set target printer to printer1
		print URL with properties print settings target printer
		if not web_running then quit
	end tell
end printer

Well it seems no one seems to know how/has no experience useing arguments with applescript
How about if anyone has at least example(s) of how to script Safari to print a webpage to a specfic printer?
I’ve tried the FAQ and the example scripts but so far nothing I can find is useful (to me)
I’m getting frustracted with applescript, seems the easier the language the harder it becomes to get it to do something simple

I’ve been trying to figure out the same problem you are and I thought I’d post a reference to the correct usage of the print command:

http://developer.apple.com/technotes/tn2002/tn2082.html

Good luck!
-flashfireopal