• 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
GUI Script Printing Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI Script Printing Problem


  • Subject: GUI Script Printing Problem
  • From: G <email@hidden>
  • Date: Sun, 15 Jun 2003 11:14:07 +0100

Dear List,

I'm having a problem printing within TextEdit, using <keystroke "P" with
command down>, when this line is executed it opens the Page Setup dialog
window, as supposed to the print dialog window.

I have tried accessing Page Setup, shift->command->p, to see if it would
allow me to print, but it does not, it brings up the Page Setup dialog
window as you would expect.

It is very strange, as I can manually type, command->p, at the keyboard
within TextEdit, and it brings up the print dialog window correctly.

I suspect I am doing something very silly, but would appreciate it if
someone could help me.

Here is my code:

try
tell application "TextEdit"
activate
end tell
tell application "System Events"
tell process "TextEdit"
display dialog "Do you want to print?" buttons {"Print", "Review
Selection"} default button "Print"
set x to the button returned of the result
if x = "Print" then
keystroke "P" with command down
end if
end tell
end tell
on error
beep
end try

Many thanks in advance,
Gareth
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: GUI Script Printing Problem
      • From: Bill Cheeseman <email@hidden>
    • Re: GUI Script Printing Problem
      • From: Rob Jorgensen <email@hidden>
    • Re: GUI Script Printing Problem
      • From: Gary Lists <email@hidden>
  • Prev by Date: Re: Perl syntax
  • Next by Date: Re: URL Access Username Format Bug?
  • Previous by thread: Re: URL Access Username Format Bug?
  • Next by thread: Re: GUI Script Printing Problem
  • Index(es):
    • Date
    • Thread