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

Re: GUI Script Printing Problem


  • Subject: Re: GUI Script Printing Problem
  • From: Rob Jorgensen <email@hidden>
  • Date: Sun, 15 Jun 2003 09:20:24 -0400

At 11:14 AM +0100 6/15/03, G wrote:

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

Maybe this will work:

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

--

Rob Jorgensen
Ohio, USA
_______________________________________________
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.

References: 
 >GUI Script Printing Problem (From: G <email@hidden>)

  • Prev by Date: Re: GUI Script Printing Problem
  • Next by Date: Re: GUI Script Printing Problem
  • Previous by thread: Re: GUI Script Printing Problem
  • Next by thread: Re: GUI Script Printing Problem
  • Index(es):
    • Date
    • Thread