Mac Help Forums


Reply
Thread Tools Display Modes

Automatic timed screen grab in OS X Tiger !

 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      28th June 2006
If you need to capture the Screen on your Mac here is one way of doing it...


First, create a folder on your Desktop called captures.

Next we are going to write a shell script...


Open TextEdit and type:


Code:
#!/bin/sh


screencapture -x /Users/computer/Desktop/captures/`date +%b%d%H:%M:%S`.png
Changing the word 'computer' to your username !



Whats all that code then !!!

Well the first bit tells the Mac what Shell to run the code in. In Tiger the default is 'bash'

The next line...

Code:
screencapture -x
Capture the whole screen without making the camera click sound !

Leave off the -x if you want to hear the camera !

Next bit...

Code:
/Users/computer/Desktop/captures/
This is the 'path' where the screencaptures will be saved, on this Mac my username is 'computer' so the screengrabs will be saved in a folder called 'captures' on my desktop.

You will have to amend this to your own folder, maybe

Code:
/Users/yourUserName/Desktop/
All the files would then go on your Desktop. (remember there will be 20 every hour, so it'll get cluttered !)

The next bit...

Code:
`date +%b%d%H:%M:%S`
This is the unix command 'date' this gets the current date...

June2816/30/23

ie June the 28th 16.30 and 23 seconds.

The next bit...

Code:
.png
The default for Screencapture's via the Terminal is to output a .png file

If you don't have this tagged onto the end of the filename, the files aren't double clickable.


So we now have our Shell Script, do a save as

Code:
screenie.sh
Don't allow TextEdit to add .txt to the end of the name !

Now we need to open Terminal (Applications-->Utilities)

Once Terminal is open then type

Code:
chmod +x
type a space after the x

Don't press return yet...


Find the screenie.sh file and drag it into the terminal so that you get a line similar to this...


Code:
chmod +x /Users/computer/Desktop/screenie.sh

Now you can press the return key !

This line turns screenie.sh into an executable file, ie it's now like a little application that the shell can 'run'.

Now move the screenie.sh file somewhere safe, maybe in the Applications folder if you want.

Now download Launchd editor from here.

This is not technically needed but it makes life easier ! Please pay the Developer if you use the App a lot !

Now have a look in this folder,

Code:
Users/yourusername/Library
Is there a folder called 'LaunchAgents' if there isn't then create one.

Now open up Launchd editor.

We are now going to create the 'Screenie plist file'

Just edit as the screen grabs below...






Changing your path info as neccesary !


On my Mac I have left the screenie.sh file on the Desktop !

In the second pic above the 300 seconds will mean that the Shell Script will run every 5 minutes ! Change to suit your needs !



Now save that file as screenie.plist in the 'LaunchAgents' folder that you created above.

Now back to Terminal and type...

Code:
launchctl load /Users/computer/Library/LaunchAgents/screenie.plist
Again changing the path as necessary !

Now, best to reboot ! You are done !

Every 5 minutes a new screen grab is taken and saved to where you specified...

You can always extend this to then email the Screen Grab...FTP it somewhere what ever you want !

To turn it of...

Code:
launchctl unload /Users/computer/Library/LaunchAgents/screenie.plist
Again replace the path as neccesary !



You should end up with something like this...





regards

Ric
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A better screen grab D.M. Procida UK Macs 42 10th May 2007 02:45 PM
Why is Screen Grab crippled during DVD playback? Roger Apps 11 31st March 2007 08:53 PM
Automatic OS X screen depth setting Dennis M Mac 2 22nd February 2007 11:28 PM
Is Grab broken in Tiger? ray UK Macs 5 6th October 2005 12:27 PM
Panther Screen Grab Andy Spark Mac 6 23rd December 2003 02:31 AM


All times are GMT +1. The time now is 04:55 AM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
Yikes! Teacher needs help!
Mollyc4627 (7 Hours Ago, 08:57 PM)

Unable to log in to websites
AMonty20 (11 Hours Ago, 05:52 PM)

Add Different Speech Commands
bae_22 (12 Hours Ago, 04:40 PM)

Login (2 macs) passwords spontaniously changed?
Roger Vaught (13 Hours Ago, 03:31 PM)

Best car charger or inverter for Macbook Pro?
imeme87 (13 Hours Ago, 03:22 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51