Re: Scripting Print Orientation
Re: Scripting Print Orientation
- Subject: Re: Scripting Print Orientation
- From: "Mr. Dan Pouliot" <email@hidden>
- Date: Wed, 26 Dec 2007 11:01:46 -0500
Use PreFabUIBrowser instead of UIElementInspector. Demo version works for 1 month.
Thanks, that got me much farther down the path. To complicate things, I need to also change the print orientation for Firefox. As it is right now, I'm sending a _javascript_:print() command which opens the print dialog. However, Firefox doesn't set print orientation in that window, but rather in Page Setup (grrrr). So, as it stands right now, I have to script FF to first cancel printing, then set print orientation, then continue printing. I have a (seemingly) simple script to cancel printing then go to page setup (run this script after doing cmd-P in FF):
activate application "Firefox" tell application "System Events" tell process "Firefox" click button "Cancel" of window "Print" delay 2 tell menu bar 1 click menu item "Page Setup..." of menu 1 of menu bar item "File" end tell end tell end tell
what's wierd about this script is the Page Setup line only executes successfully if I comment out the "Cancel" line. For some reason the script doesn't like to cancel printing then open Page Setup. I tried adding the delay, but that doesn't help. Any ideas? |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden