Friday, March 9, 2007

How to Capture laptop screenshots to remote devices

What you need:
  • iSightCapture
  • A custom-made Automator workflow
  • A Blackberry with data services (I have a T-Mobile Pearl)
  • A free program called midpSSH installed on your Blackberry
I won't cover these things in this hint: Installing midpSSH on your Blackberry, setting up a static address to connect to (search Google for no-IP for mac), beginner information on using Terminal and Automator. Read on for the solution...

First, download iSightCapture and put it in /usr/bin. Then start a new Automator workflow, and make it look like this:
  1. Automator: Run Shell Script -- (240x260 is my Pearl's screen resolution). The script: isightcapture -h 240 -w 260 /Users/you/Documents/shots/snappit.jpg
  2. Finder: Get Specified Finder Items [ignore results from previous action] -- add /Users/you/Documents/shots/snappit.jpg
  3. Mail: New Mail Message -- enter your Blackberry's email address in the To: field, give it a subject and a message if you so desire, and select your account (note you must have already set up some email address using the program Mail)
  4. Mail: Send Outgoing Messages
  5. Automator: Run AppleScript [ignore results from previous action] -- This script hides Mail:
    tell application "System Events"
    tell application "Mail" to activate
    tell process "Mail"
    keystroke "h" using command down
    end tell
    end tell
  6. Automator: Run Shell Script [ignore results from previous action]:
    cp /Users/you/Documents/shots/snappit.jpg
    /Users/YOURUSERNAME/Documents/shots/snappit`date +%y%m%d%H%M%S`.jpg
Save the workflow and place it somewhere (remember where you save it). The command to execute an Automator script in the shell is: automator /path/to/automator.workflow/, and it takes no attributes. Test your workflow using Terminal. Set up your laptop with no-ip or some other dynamic DNS helper (dyndns.org). Connect to your computer via midpSSH on your phone, login, and execute the workflow. Obviously, you'll want to enable remote login via ssh in the Sharing tab of System Preferences first.

I also then put in an Automator pause for 20 seconds, and then the shell script killall Mail, b

No comments:

Your Ad Here