Cell Phone Forums > General > Cell Phone News/ New Phones » AppleScript: Taking screenshots


Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-07-2008, 05:44 AM
cellphoner's Avatar
RSS Bot
 
Join Date: Feb 2007
Posts: 3,933
AppleScript: Taking screenshots

Filed under: Features, How-tos, AppleScript



Last week, Dave mentioned that you can change the file type used system-wide for screenshots. However, some people are afraid of using Terminal.app to muck around with their Mac. In this week's AppleScript article, I am going to show you how to take screenshots and change their file type using an AppleScript.

The AppleScript
property N : 0
set N to N + 1
set picPath to ((POSIX path of (path to desktop)) & "Picture_" & N & ".png") as string
do shell script "screencapture " & quoted form of picPath


Using the AppleScript
Open the ScriptEditor (/Applications/AppleScript/ScriptEditor.app). Copy/paste the AppleScript into the script edtitor and click the run button at the top. You will hear the camera shutter sound and a picture will be taken and saved to your desktop.

This script comes in handy when you want to take a screenshot in a different format. To do this, just change the ".png" file type to whatever you might want (say, .jpg, .tiff, etc.). When you re-run the script, the new file type will be associated with the capture image.


Continue reading to learn how to save this script.Continue reading AppleScript: Taking screenshots


Read | Permalink | Email this | Comments


</img>
</img> </img>


More...
Digg this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Automatic Translations made by Google:
Albanian Arabic Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Indonesian Italian Japanese Korean Latvian Lithuanian Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Taiwanese Thai Turkish Ukrainian Vietnamese