• 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
This works in Applescript, but not ASObjC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

This works in Applescript, but not ASObjC


  • Subject: This works in Applescript, but not ASObjC
  • From: Brian Christmas <email@hidden>
  • Date: Sun, 13 Sep 2015 14:52:37 +1000

G’day

I’m trying to display the printer Queues for two printers, called from a button in my app.

The code displays the windows when used in Applescript, but not in ASObjC. The count gets to 4, just the windows don’t display.

Anyone able to set me on the right track please?

Regards

Santa

property theCoverPagePrinter : "A4 Printer"
property theLargePagePrinter : "Large Page Printer"
property runForOz : true
my resumePrinters:me

on resumePrinters:sender
if my runForOz then say "Resuming printers"
#tell application "System Events"
try
if my runForOz then say "Resuming printers 2"
tell application theCoverPagePrinter to activate —< This opens window in Applescript, but not in ASObjC
# tell application "System Events" to set visible of window theCoverPagePrinter to true
if my runForOz then say "Resuming printers 3"
tell application "System Events" to tell process theCoverPagePrinter
if my runForOz then say "Resuming printers 4"
try
click button "Resume" of toolbar 1 of window theCoverPagePrinter
end try
end tell
end try
try
tell application theLargePagePrinter to activate
tell application "System Events" to tell process theLargePagePrinter
try
click button "Resume" of toolbar 1 of window theLargePagePrinter
end try
end tell
end try
# end tell
end resumePrinters:



 _______________________________________________
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: This works in Applescript, but not ASObjC
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Getting the Input Language with System Events
  • Next by Date: Re: This works in Applescript, but not ASObjC
  • Previous by thread: Re: Getting the Input Language with System Events
  • Next by thread: Re: This works in Applescript, but not ASObjC
  • Index(es):
    • Date
    • Thread