rscl Posted September 6, 2010 Share Posted September 6, 2010 (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 September 6, 2010 by rscl Link to comment Share on other sites More sharing options...
l3ill Posted September 6, 2010 Share Posted September 6, 2010 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 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
seandisanti Posted September 6, 2010 Share Posted September 6, 2010 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) Link to comment Share on other sites More sharing options...
jennico Posted November 6, 2010 Share Posted November 6, 2010 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.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
LarryDalooza Posted November 8, 2010 Share Posted November 8, 2010 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) AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now