Hi everyone.
I’m building a new application for my site. It generates jpeg from my isight.
For now, actual release of “isightcapture” (http://www.intergalactic.de/hacks.html) apparently crates images on root of my Mac (I can’t undestand if this has any controls about this).
So, Script works fine, but problem is when I try to move jpeg from root to my picture folder.
Any halp?
set enne to a_uno
set isight to the quoted form of POSIX path of (path to resource "isightcapture")
repeat
set enne to (enne - 1)
tell application "Finder"
set mese to month of (current date) as string
set giorno to day of (current date) as string
set ora to time of (current date) as string
set date_stamp to (mese & giorno & ora)
set date_stamp to date_stamp & ".jpg"
do shell script isight & space & "-t jpg" & space & date_stamp
delay 1
-- HERE YOU ARE THE PROBLEM!!!!!!
move date_stamp to (path to pictures folder)
end tell
delay a_due
if enne is 0 then exit repeat
end repeat
It is very simple, you can specify the whole path as argument for isightcapture,
the date string can also be set easier.
set enne to a_uno
set isight to the quoted form of POSIX path of (path to resource "isightcapture")
repeat
set enne to (enne - 1)
tell (current date) to set date_stamp to ((its month as string) & (day as string) & (words 1 thru 3 of time string as string))
set date_stamp to quoted form of (POSIX path of (path to pictures folder) & date_stamp & ".jpg")
do shell script isight & space & "-t jpg" & space & date_stamp
delay a_due
if enne is 0 then exit repeat
end repeat
Put the right path on the shell script is a simply, like fantastic idea. I feel so stupid to do not thinked to it
But there are an error on one of your row. Script give me an error, I think that the shell find strange space…
So the right script is this one
set enne to a_uno
set isight to the quoted form of POSIX path of (path to resource "isightcapture")
repeat
set enne to (enne - 1)
set mese to month of (current date) as string
set giorno to day of (current date) as string
set ora to time of (current date) as string
set date_stamp to (mese & giorno & ora)
display dialog date_stamp
set date_stamp to quoted form of (POSIX path of (path to pictures folder) & date_stamp & ".jpg")
do shell script isight & space & "-t jpg" & space & date_stamp
delay a_due
if enne is 0 then exit repeat
end repeat
Are you thinked that it’s more expensive than yours? I know…