Sign in to follow this  
Followers 0
rscl

Change Deafult printer settings

5 posts in this topic

#1 ·  Posted (edited)

Hi,

Is there any way to change the default printer's PAPER SIZE & ORIENTATION settings from default->Specific & Specific->default ??

Thx for any ideas/pointers.

Best regards,

Sans

PS: I mean via an AutoIt script!

Edited by rscl

Share this post


Link to post
Share on other sites



I usually do stuff like this by sending keyboard commands to the printers popup dialog window with send or command click.

most printers have different setting for this so you will have to experiment with your settings to come up with a script that works for your printer.

in your case 2 scripts that start with something like:

Send("^p")

which opens the print dialog from most programs.

and then one that sends the command for portrait, and one with commands for landscape.

so you can just click whichever one you need...

hope this helps.

Good Luck!

Bill

Share this post


Link to post
Share on other sites

I usually do stuff like this by sending keyboard commands to the printers popup dialog window with send or command click.

most printers have different setting for this so you will have to experiment with your settings to come up with a script that works for your printer.

in your case 2 scripts that start with something like:

Send("^p")

which opens the print dialog from most programs.

and then one that sends the command for portrait, and one with commands for landscape.

so you can just click whichever one you need...

hope this helps.

Good Luck!

Bill

you could also use printui.dll (google for examples)

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

you find the document settings in the registry:

RegRead("HKCU\Printers\DevModePerUser",$sPrinter)

it's a binary string and depends on the printer, so it is not possible to decrypt it. but by changing the settings and reading the reg string you can detect the needed setting and regwrite it. you can save the default setting and restore it afterwards.

cheers j.


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites

I second this... rundll32 and printui.dll ... worth it's weight in gold... though, what does it weigh, really?

LAr.

you could also use printui.dll (google for examples)


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0