Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!claris!outpost.UUCP!peirce From: peirce@outpost.UUCP (Michael Peirce) Newsgroups: comp.sys.mac.programmer Subject: Re: What printer's selected? Message-ID: <0B010004.agzs7a@outpost.UUCP> Date: 4 Apr 91 02:36:41 GMT Reply-To: peirce@outpost.UUCP Organization: Peirce Software Lines: 19 X-Mailer: uAccess - Mac Release: 1.0.3 In article <312@crucible.UUCP>, al@crucible.UUCP (Al Evans) writes: > > Unavoidably, I need to find out from an application what printer is > currently selected. Maybe I'm just being brain-dead, but I can't > seem to find any "legal" way. The closest I've come up with is to > get the h & v resolutions from a PrGeneral call, and make an > educated guess based on the results. But this seems kinda clunky:-) > Am I just missing something obvious? Get the STR resource with ID = -8192. This is the name of currently selected printer. I'm not sure if names like "LaserWriter" or "ImageWriter" change on international systems? -- michael -- Michael Peirce -- outpost!peirce@claris.com -- Peirce Software -- Suite 301, 719 Hibiscus Place -- Macintosh Programming -- San Jose, California 95117 -- & Consulting -- (408) 244-6554, AppleLink: PEIRCE