doesn’t work. How do you use this stuff? Please leave out the confusing extras and just give me the line of script which will take the picture. Thank you!
Model: iMac
AppleScript: 2.1.1
Browser: Safari 417.9.3
Operating System: Mac OS X (10.4)
you can’t always depend on the $PATH variable to be set correctly. if you know where ‘isightcapture’ (or whatever executable you are using) lives, tell AppleScript!
if you aren’t sure where something lives, try this:
which <executable>
such as, which isightcapture
if the executable is in your path, ‘which’ will find the first one.
cheers.
edited to add:
if you are NOT sure where an executable lives and you want to write a script for use on multiple machines (where the executable could be literally anywhere), here is a trick i’ve used in the past with great success:
property myiSightCapture : "no"
try
set myiSightCapture to (do shell script "/usr/bin/locate isightcapture | sed 2,10000d")
end try
if myiSightCapture is "no" then
display dialog "Cannot find iSightCapture on this computer."
else
doMain()
end if
on doMain()
display dialog "We've found iSightCapture! Replace this with your actual code"
end doMain
you could use the same technique with the ‘find’ command if you are not sure that the ‘locate’ database is up to date.
and the little isight green light went on!..for about 2 seconds. Then it turned off and I got an error. Did i do something wrong?
It said “FATAL: graphics exporter failed”.
the folder /usr/bin is an invisible folder where lots of UNIX command line files are stored.
You can open it from the Finder typing shift-cmd-G and the path.
But it should also work on the desktop. Is there a file image.png at the root directory?
Considering that changing the script to end in face.png returns the same error, I suppose not. I don’t have an administrators account. Might that affect something?