a little help please?

hello all–

i’m a newb trying to understand applescript and automator. i am working on the following workflow with automator (i’ll try to keep this as simple and explanatory as i can):

  1. the computer does a get text and requests your name:
  2. the computer copies this info onto the clipboard.
  3. isight will automatically take a picture the name of the file: video snapshot.tiff
  4. (part i’m stuck on)
    i’m trying to get automator to rename the file with the “name” that is present in clipboard.
  5. the photo gets dropped into a folder with the name and photo of the person who did it.

i think it would be fun for parties to see everybody’s picture and inputted data… especially in a random screensaver with cool music.

i appreciate any input that you have, and humbly accept your help :wink:

Roger

Model: 2.0GHz MacBook Pro - 2GB/200GB/256/802.11n/OS X Leopard
Browser: Safari 523.10
Operating System: Other

Hi Roger,

download the CLI iSightCapture from Axel Bauer’s site
and put the executable file into /usr/local/bin
Then use this script:


set theName to text returned of (display dialog "Enter a name:" default answer "")
set picFolder to path to pictures folder as Unicode text
set nameFolder to picFolder & theName
try
	tell application "Finder" to make new folder at folder picFolder with properties {name:theName}
end try
set newFile to quoted form of POSIX path of (nameFolder & ":" & theName & ".png")
do shell script "/usr/local/bin/isightcapture -w 640 -h 480 -t png " & newFile

Notes: you can put iSightCapture anywhere you want, but then you must adjust the path in the do shell script line
The named folders will be created in the pictures folder of the current user

StefanK–

Thanks for your help. The script and isightcapture work great! Hopefully I can learn to do it on my own too.

Roger

Hi,

Just to answer the OP’s question for those of you who only want to do this with Automator.
In 10.5 (leopard) you can now use variables

In the Automator search field, type ask text
Add the action “ask for text” to the right side.

In the “ask for text” action, crtl click inside 'Default Answer" field.
Go to the ‘New variable’ menu in the contextual menu that pops up.

In the ‘variable Options’ pop up, set the Name of the variable, in the Name field.
The Name field will be the name of your variable
Ignore the Value field.
Click Done.
I selected to Require an answer in the “ask for text” action

In the Automator search field, type set var

Add the action “set value of variable” to the right side.
A Blue tag ( your variable ) on the drop down menu in the action, should have the name of the one you just made.
If not click the drop down in the "set value of variable " action and change it to your one.

In the Automator search field, type take vid
Add the action “Take video Snapshot” to the right side.

Go to the view menu in the menu bar and select variables.
I new window partition will slide up on the right side.
You can also click the button that looks like a large blue Plus symbol = , to show or hide this partition.

Inside the variables partition you will see ( your variable ) click and drag it
into the “Take video SnapshotSave as field, just in front of the default text
Video Snapshot.tiff’.

Now delete the text Video Snapshot leaving the .tiff
This should now leave you ( your variable ) .tiff

I selected to Take picture automatically in the “Take video Snapshot” action

That;s it, It will ask your name, take the shot and name the file with the person name.