• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Print Orientation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Scripting Print Orientation
      • From: "Gary (Lists)" <email@hidden>
  • Prev by Date: Re: App's added to Dock or not
  • Next by Date: Re: Scripting Print Orientation
  • Previous by thread: Re: Scripting Print Orientation
  • Next by thread: Re: Scripting Print Orientation
  • Index(es):
    • Date
    • Thread