Re: Printer Setup Utility, starting a stopped printer.
Re: Printer Setup Utility, starting a stopped printer.
- Subject: Re: Printer Setup Utility, starting a stopped printer.
- From: deivy petrescu <email@hidden>
- Date: Sun, 25 Mar 2007 12:33:20 -0400
On Mar 24, 2007, at 18:49, Peter Baxter wrote:
Hi Thomas,
Your solution could look something like this:
The address could be done in a neater way, but I'm getting tired,
and I'm sure someone else can work out a general way of getting the
address of the printer.
tell application "Printer Setup Utility"
set currentPrinter to "Macintosh
HD:Users:peterba:Library:Printers:" & name of current printer & ".app"
get status of current printer
try
if status of current printer is not (idle) then
my activatePrinter
set status of current printer to idle
end if
end try
end tell
on activatePrinter()
tell application currentPrinter
activate
end tell
end activatePrinter
Hi Deivy,
The script works perfectly, I just didn't think that it should be
necessary to manually type in the address of the printer app as
Yvan showed.
Peter J Baxter
mail: email@hidden
It's easy to play any musical instrument: all you have to do is
touch the right key at the right time and the instrument will play
itself.
-- J.S. Bach
Hi Peter.
I am sorry, but your script does not really work!
The first problem, you can *not* set a read only property.
In the case of the "printer setup utility", one of this properties is
"status".
Try to setup the "status" to something else than the current status
and check to see if it did change.
You will se it did not!
The second problem, unless, there is something missing from the
script you sent, your handler does not do what you think it does. It
does not know what "currentPrinter" is.
You have to pass the variable in the call or make it a property.
I have not yet had time to check, but may be using CUPS and Safari or
GUI scripting, one can achieve the change in status, but it will not
be with scripting "printer setup utility".
Deivy
_______________________________________________
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