image
image

Go Back   macosx.com > Mac Help Forums > HOWTO & FAQs

Reply
 
LinkBack Thread Tools
  #9  
Old December 19th, 2008, 04:49 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Tex-Twil is on a distinguished road
Hello,
tried the AppleScript hac but it doesn't work either:

Quote:
do shell script "/Users/me/webcam/isightcapture test.jpg"
Quote:
$ open /Users/me/webcam/script.app
LSOpenFromURLSpec() failed with error -10828 for the file /Users/me/webcam/script.app.
any ideas ?

Last edited by Tex-Twil; December 19th, 2008 at 04:58 AM.
Reply With Quote
  #10  
Old December 19th, 2008, 05:02 AM
Giaguara's Avatar
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,619
Thanks: 7
Thanked 99 Times in 98 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
How did you build your application?

LaunchServices/LSInfo.h has:

Error -10828
kLSNoClassicEnvironmentErr = The Classic emulation environment was required but is not available.

Looks like you are trying to run a Classic type application on 10.5.
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote
  #11  
Old December 19th, 2008, 05:04 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Tex-Twil is on a distinguished road
Quote:
Originally Posted by Giaguara View Post
How did you build your application?

LaunchServices/LSInfo.h has:

Error -10828
kLSNoClassicEnvironmentErr = The Classic emulation environment was required but is not available.

Looks like you are trying to run a Classic type application on 10.5.
There is nothing I built. The application is just the one line script posted on the beginning.

edit: ok I think Im a noob with Apple Script. In the how to is written "Open Script Editor and type in:". I just edited a new file using vim so I guess my error is here.

Do I have to build the application ? how can I do it via command line ?

EDIT2: I've tried this way:
Quote:
Originally Posted by script.txt
do shell script "/Users/me/webcam/isightcapture test.jpg"
then
Quote:
osascript script.txt
but it says again

Quote:
script.txt:0:76: execution error: FATAL: setting data channel failed - cam busy/not connected ? (1)
EDIT3: ouff Finally I set up a VNC server to my MacBook Pro and created the Application using the Script Editor. It works great

Last edited by Tex-Twil; December 19th, 2008 at 06:30 AM.
Reply With Quote
  #12  
Old December 19th, 2008, 06:34 AM
Giaguara's Avatar
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,619
Thanks: 7
Thanked 99 Times in 98 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
So wait, you edited those with VIM and not ScriptEditor of AppleScript?

/Applications/AppleScript/ -> open Script Editor

and replace the /Users/me parts with your username in place of me
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote
  #13  
Old December 19th, 2008, 06:40 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Tex-Twil is on a distinguished road
Quote:
Originally Posted by Giaguara View Post
So wait, you edited those with VIM and not ScriptEditor of AppleScript?
Yes that's what I did first cos I was connected to my mac only via ssh. But it's now fixed. see my previous post EDIT3.
Reply With Quote
  #14  
Old January 14th, 2009, 07:27 PM
Registered User
 
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
shadow21 will become famous soon enoughshadow21 will become famous soon enough
isightapture over SSH WORK!!!

Over SSH

1. get process ID loginwindow "sudo killall -s loginwindow" return $PID
2. "sudo launchctl bsexec $PID isightcapture -t jpg /file.jpg"

-EXAMPLE----
sudo killall -s loginwindow
kill -TERM 35
sudo launchctl bsexec 35 isightcapture -t jpg /file.jpg
-------------------------------

WORK!!!

from screencapture
SECURITY CONSIDERATIONS
To capture screen content while logged in via ssh, you must launch screencapture in the same mach boot-strap bootstrap
strap hierarchy as loginwindow:

PID=pid of loginwindow
sudo launchctl bsexec $PID screencapture [options]


http://developer.apple.com/DOCUMENTA...capture.1.html

Sorry for my english
Reply With Quote
  #15  
Old October 24th, 2009, 11:13 AM
Registered User
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
t0rus is on a distinguished road
isightcapture over ssh

there's no need for creating gui apps or scripts, here's a workaround:
connect to remote host via ssh, then type:
ps ax | grep [l]oginwindow
output will look something like
1381 ?? Ss 0:01.36 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console

The PID is the first number in the output; now type
sudo launchctl bsexec 1381 isightcapture -t png /somepic.png

and voila
Reply With Quote
Reply

Bookmarks

Tags
applescript, automator, isightcapture

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 03:04 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.