Re: how can I stop a print job in OSX with AS?
Re: how can I stop a print job in OSX with AS?
- Subject: Re: how can I stop a print job in OSX with AS?
- From: Jean-Baptiste LE STANG <email@hidden>
- Date: Sat, 19 Apr 2003 20:45:44 +0200
You should have a look to lpr, and cancel (by doing 'man lpr' or 'man
cancel')
JB
Le dimanche, 20 avr 2003, ` 02:21 Europe/Paris, Tony a icrit :
Hi, please help.
I send a job to the printer and immediately realise that I have chosen
the wrong paper size, there is an error in the text or the print
settings are wrong!! OK not every time, but it does happen. As far as I
know, in OSX it is quite difficult to abort a print job quickly and I
have been trying to write a script to do this, eventually to have it as
an applet in the dock perhaps. The property of a printer in print
center called status can have the value aborted but it seems that
this is a read-only property and cannot be set by a script. I have
tried using the access to the UI with System Events 1.2 but without
success so far. The script I have tried is copied below. I ran it from
the Script Editor when I had a print job running (a page of text) and
the event log showed that it worked. (I am a beginner so my script is
based on other examples I have seen.) It doesnt seem to have any
effect on the printer or the job in print center. It would be great if
someone would tell me what I am doing wrong or tell me that what I am
trying to do is impossible! (This is a later version of a message I
sent to AS discussions but I have had no response there.) Many thanks.
tell application "Print Center"
activate
end tell
tell application "System Events"
get properties
tell process "Print Center"
tell menu bar 1
click menu item "stop jobs" of menu "printers"
end tell
end tell
end tell
_______________________________________________
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.
_______________________________________________
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.