Screenshots often come in handy — for instance , when you need a nimble shot of something you ’re working on or when you desire to send a picture of an computer error notification to IT . Mac OS X includes some good built - in tools for carry screenshots — Shift - Command-3 will take a pictorial matter of the whole cover , and Shift - Command-4 will let you haul a region to becharm ( or press the place Browning automatic rifle to apply the tv camera icon to take image of windows ) .
But using these tools , mean you often do the “ screenshot two - step . ” First , you take the picture . Then you switch to the Finder , Richard Morris Hunt for the saved file on your background , and open it to make indisputable you captured what you intended . With a small help from Unix and AppleScript , you’re able to automate this process ( as long as you ’re running OS X 10.3 or 10.4 ) . An AppleScript will activate a Unix script that captures the screenshot , writes it to a uniquely named data file , and then open up the image in Preview .
When you ’ve entered the script , blue-ribbon File : Save As , give the script a name , set the File Format pop - up carte du jour to software , and lay aside the handwriting to a commodious location . One potential spot isyour user folder / Library / Scripts folder — from here it will be easily accessible in the Scripts menu . ( make this folder if you do n’t have it already . ) To learn more about using the Scripts Menu , see the terminal of this clause .
Digging into the code
Since part of the point of these breath is to teach , here ’s what each patch of the handwriting does . Feel devoid to skip this part if you ’d just wish to put the script to piece of work . ( The semicolon in the above code simply disjoined commands , so they wo n’t be explained below . )
Using the script
After you ’ve saved the playscript , using it is simply a matter of activate it . If you saved it to your drug user ’s Library / Scripts folder , that ’s as simple as choosing it from the Script ikon in the menubar . You ’ll then see the camera ikon onscreen ; press the Space Bar when it ’s over the windowpane you ’d wish to catch . After a brief delay , the image you captured will open in Preview .
An even light way to put the script to apply is through a keyboard shortcut — using any one of a number of program ( Peter Maurer ’s Butler , Objective Development ’s LaunchBar , Startly Technologies ’ QuicKeys X , Blacktree ’s Quicksilver , and so on ) , you’re able to assign a red-hot samara to launch your AppleScript software program . Now you do n’t even require the menubar ; just hit the live winder from any program .
There you have it ! Snap - and - panorama , just like that !
Aside: The Scripts Menu
Apple include a arrangement - blanket lineament known as the Scripts menu with all late version of oxygen X. Through the Scripts menu , you could use predefined and exploiter - create AppleScripts from anywhere , via an ikon in the menubar . This feature of speech , however , is disabled by default .
To enable it , start the Applications / AppleScript leaflet . If you ’re running OS X 10.3 , just double - tick the Install Script Menu program and you ’re done . If you ’re using OS X 10.4 , establish the AppleScript Utility . Check the Show Script Menu in fare bar box , and also ( if you need to have access to some utile handwriting ) check the Show Library handwriting box , then quit the program . After execute the proper program for your osmium release , you should now see the Script ikon in the menubar , as seen at right .
When you click the ikon , you ’ll see a crew of brochure for be handwriting provided by Apple . But you could also bring your own things to this menu . To do so , create a folder called Scripts in your drug user ’s Library folder . Anything you place in this booklet , including other folders , will show up at the bottom of the Scripts menu . So for this hint , if you store your new AppleScript program into that folder , you ’ll be able to get to it from any program .