Hi,
I want to print a page in Landscape orientation. It seems like WebRecorder cannot record this print procedure. I am not sure how to do it. I wonder if there any sample codes handle this already. and if no, could you please give me some hints.
The procedure is: open the Print window (I know how to do this), then click Preferences, check landscape box, then click ok, then click Print (I know how to do this).
Thanks a lot!
scripts for setting print preference
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Something like this:
Press Enter
I say *something* like that because the dialogs may vary for your OS and printer driver. The above works for me in Vista with my default printer.
Actually, it's quicker to do it via Print Preview:
This is for IE7.
Code: Select all
//Send CTRL+P
Press CTRL
Send>p
Release CTRL
//Wait for the print dialog
WaitWindowOpen>Print
//Send ALT-r to invoke Preferences
Press ALT
Send>r
Release ALT
//Wait for the Printing Preferences dialog
WaitWindowOpen>Printing Preferences
//Go to the Basics tab
Press CTRL
Press Tab * 4
Release CTRL
//ALT-O to go to Orientation
Press ALT
Send>o
Release ALT
//Down one to Landscape
Press Down
//Press Enter to OK
Press Enter
WaitWindowClosed>Printing Preferences
SetFocus>Print
I say *something* like that because the dialogs may vary for your OS and printer driver. The above works for me in Vista with my default printer.
Actually, it's quicker to do it via Print Preview:
Code: Select all
//Select Print Preview
Press ALT
Send>fv
Release ALT
//Wait for the Print Preview window
WaitWindowOpen>Print Preview
//ALT-L selects landscape mode
Press ALT
Send>l
Release ALT
//ALT-P prints
Press ALT
Send>p
Release ALT
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?