Automate a printer?

Hi guys,
I was wondering if there was an easy way to make my HP inkjet print a test page once a week automatically. I ask this because I don't use the printer very often and at times it sits for a week or two. The print heads dry up and have to be replaced prematurely. I looked in my windows help as well as my printer's help but no "help" :eek:
I am running windows XP MCE, the printer is a HP 6180 photo all-in-one. I am running Homeseer2 with lots of x10.

Thanks a bunch for any help,
Karen
 
Create a scheduled windows task like this:

rundll32 printui.dll,PrintUIEntry /n "printer name" /k

rundll32 printui.dll,PrintUIEntry /n "HP 6180 photo all-in-one" /k

Or you can create an event in HS to execute this command line:

&hs.launch "c:\windows\system32\rundll32.exe", "printui.dll,PrintUIEntry /n ""printer name"" /k"

&hs.launch "c:\windows\system32\rundll32.exe", "printui.dll,PrintUIEntry /n ""HP 6180 photo all-in-one"" /k"

The Pod
 
:D Thank you "Mr. Pod"

I'd like to go with the HS method if possible.
I created an event in HS, For the Action I selected "Launch Application". and cut and pasted your link.
I then looked at my control panel / printers and took the name from the printer in use "HP Photosmart C6100 series"
I then typed that name in place of the printer name.
Then I hit TEST and nothing happened.
Did I do something wrong? :huh:
Thanks a bunch,
Karen
 
11/18/2006 9:52:14 PM - Error - Launching application: The system cannot find the file specified
11/18/2006 9:52:14 PM - Error - (continued) File name: "&hs.launch "c:\windows\system32\rundll32.exe", "printui.dll,PrintUIEntry /n ""HP Photosmart C6100 series"" /k"", Params: ""

My HS log

-Karen
 
Try creating the event using the "Run Script" as the action. Then enter the command line in the OR section. See attached.

The Pod
 

Attachments

  • printer.jpg
    printer.jpg
    32.9 KB · Views: 36
:D The Pod,

You are the best!! I've been wanting to do that for quite some time. It works perfectly. Well almost...
I don't want to push it, I am so greatful already but the test page for this printer prints all in black except fot the "Windows flag" at the top of the page which is about the size of a finger nail (a man's fingernail..mine are pretty long :huh: )
Can I get it to print something else that uses a little bit more color?

Thank you So much,

Karen
 
Why, as long asa all the colors come out then the nozzles are clean. I just bought a color laser printer from dell to solve this problem.
 
"Why, as long asa all the colors come out then the nozzles are clean. I just bought a color laser printer from dell to solve this problem. "

Hi MeSteve,

Well, it's just so little color ink that if the ink is getting a little dry, sticky (or whatever it does) that it might not be enough to "keep the nozzles fresh". I have a friend that had the same printer and used it almost daily and never had problems. So I figure if I printed a color page every couple of days I'd be good. The test page on my old printer printed about half in color and half in black. My new printer's test page prints 99.9% black.
I also considered a color laser but the resolution is not as good as the inkjet (especially for photo printing). I also like the All-in-One (including fax).

-Karen
 
OK Karen, I thought you just wanted a standard windows "print test page". This should give you what you are looking for.

Create a document (I used wordpad to create c:\test.rtf) and save it to your computer.

You then need to create a .NET script in your HomeSeer script folder with the extension .vb (I created the file called printfile.vb). Copy the following code to that file:

Code:
Sub Main(parms As Object)

Dim p as New System.Diagnostics.ProcessStartInfo()
Dim w as New System.Diagnostics.ProcessWindowStyle()

p.Verb = "print"
p.WindowStyle = w.Hidden
p.FileName = "c:\test.rtf"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)

end sub

Then in HomeSeer, create an Event to run a script. You should be able to select your script (printfile.vb) from the drop down selection box.

This should print out your document. You can try different filename/filetypes but I don't know if everything will work correctly. I know Word (.doc) files also worked in my test, but when I tried to print a picture (.jpg) file, it just opened the file up and didn't print it. :angry:

The Pod
 
The Pod,

Thank you Thank you Thank you!!

:angry:

I set it up as you said and it works perfect. I inserted a jpg from my photos into a word doc and it printed perfectly. I now set up my event to print this file every Sunday and Thursday evening. This I really believe will help my printer heads last alot longer.

It so nice of people like you and the countless others on these forums to give your time to help people out. Even though you get know benefit out of it you still help us newbies out.

THANK YOU,

Karen
 
Maybe you can have it print out your favorite cartoon or news/blog site, in color, so the end result doesn't totally go to waste :angry:
 
electron said:
Maybe you can have it print out your favorite cartoon or news/blog site, in color, so the end result doesn't totally go to waste :angry:
Electron, That's an excelent idea, but the code I provided for Karen is for a file not a URL. I do have a small application I wrote that does load and print HTML webpages that I use at work. I'll have to clean up the code a bit, but then I would be able to create a ASP page to include a favorite cartoon strip, weather for today, list of todays events (birthdays/anniversaries), etc. and have it print out every day (my own personal newspaper delivered to my desk each morning B) ).

The Pod
 
The Pod said:
electron said:
Maybe you can have it print out your favorite cartoon or news/blog site, in color, so the end result doesn't totally go to waste :angry:
Electron, That's an excelent idea, but the code I provided for Karen is for a file not a URL. I do have a small application I wrote that does load and print HTML webpages that I use at work. I'll have to clean up the code a bit, but then I would be able to create a ASP page to include a favorite cartoon strip, weather for today, list of todays events (birthdays/anniversaries), etc. and have it print out every day (my own personal newspaper delivered to my desk each morning B) ).

The Pod
That's a great idea!
 
I use the spam fax paper for the printer tests as not waste paper.
But it never fails I forget to take it out before I print a document :unsure:
 
Back
Top