knowing if a printer is connected
Peter Brigham MD
pmbrig at gmail.com
Thu Nov 19 16:57:49 EST 2009
It returns "idle" in all cases? Are you saying that it doesn't
distinguish if the printer is on/connected vs off/disconnected?
How would I get the contents of the various printer properties from
this script into rev variables to test this out? Do I use an 'on
appleEvent' handler -- if so, how? Sorry for the naive questions, but
I haven't used applescript much.
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
On Nov 19, 2009, at 3:33 PM, BNig wrote:
>
> Peter,
> I was a little too fast with my reply, I am afraid
>
> this gives me all the information of the current printer
> unfortunately it
> does return idle even if the current printer is off.
>
> tell application "Printer Setup Utility"
> set Current_Printer to name of current printer --> set a variable
> for the
> name of your current/default printer
> set tKind to kind of current printer
> set tproperties to properties of current printer
> set tJob to job of current printer
> end tell
>
> Since you are looking for an active/connected printer this is
> probably not
> working.
> regards
> Bernd
>
>
>
>
> BNig wrote:
>>
>> Peter,
>>
>> tell application "Printer Setup Utility"
>> set Current_Printer to name of current printer --> set a variable
>> for the
>> name of your current/default printer
>> end tell
>>
>> this applescript tells me the currently selected printer on MacOSX
>> 10.5.8
>>
>> regards
>> Bernd
>>
>>
>> Peter Brigham MD wrote:
>>>
>>> I have a stack system that is being used on laptops (at this point
>>> Mac
>>> OSX only). One of my beta testers uses it in three different
>>> locations. Among many other things, the stack prints out notes and
>>> various other text files from within Rev (running in IDE on RevMedia
>>> 4.0 -- eventually I'll get to porting it as a standalone). As it
>>> stands now, the user needs to select the currently available printer
>>> using the system preferences. I need a way to discover if the
>>> printer
>>> designated as active in the system preferences is actually the one
>>> that is plugged into the USB port. I have a way for the user to
>>> change
>>> the printer from within the stack, but I'd like to avoid the
>>> situation
>>> where he tries to print something and gets the bobbing printer
>>> driver
>>> icon in the dock telling him that that printer is unavailable
>>> (because
>>> he's at a different site and forgot to change his printer
>>> designation).
>>>
>>> The ideal solution would be to be able to detect the currently
>>> connected printer and send any print job automatically to that
>>> printer, but I'd settle for just being able to post an alert when
>>> trying to print to notify him that he is about to use an unavailable
>>> printer. How do I detect what printer is connected? Or at least,
>>> detect if a designated printer is connected or not?
>>>
>>> -- Peter
>>>
>>> Peter M. Brigham
>>> pmbrig at gmail.com
>>> http://home.comcast.net/~pmbrig
>>>
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/knowing-if-a-printer-is-connected-tp624188p624225.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list