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.
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: