September 22, 201114 yr In the ScriptMaster 4.11 sample file there was a function QuickTime Frame Capture which I no longer find in ScriptMaster 4.124. I think I had this work in 4.11, but now it fails, whether I go back to the 4.11 plugin or use the current version. I just get the spinning wheel forever, not even an error message. Does anyone have a clue about this? Anyone got a working webcam capture for ScriptMaster? I'm using FileMaker Pro Advanced 11.0v4 on Mac OS X 10.6.8, with QuickTime Player 10.0 (128).
September 23, 201114 yr This requires the lti-civil jar, but seems to work import java.awt.image.BufferedImage import com.lti.civil.* import com.lti.civil.awt.AWTImageConverter import com.sun.image.codec.jpeg.* factory = DefaultCaptureSystemFactorySingleton.instance() try { system = factory.createCaptureSystem() } catch (Throwable e) { return 'ERROR - no camera attached' } system.init() info = system.getCaptureDeviceInfoList().get(0) captureStream = system.openCaptureDeviceStream(info.getDeviceID()) count = 0 capturedImage = null captureStream.setObserver({ sender, image -> count++ if (count > 1) { capturedImage = image } //end if } as CaptureObserver) captureStream.setVideoFormat(captureStream.enumVideoFormats().get(0)) captureStream.start() try { Thread.sleep(2000) } catch (InterruptedException e){ return } // end try while(! capturedImage) { Thread.sleep(100) } //end while captureStream.stop() captureStream.dispose() system.dispose() bimg = AWTImageConverter.toBufferedImage(capturedImage) return bimg
September 26, 201114 yr Author Thanks for this John. I added lit-civil.jar and I don't get any error message when I run this, but it doesn't actually work either. I get a garbled image-like thing in the container field. It looks exactly the same no matter what is actually in front of my webcam, so it's being generated in some other way...
Create an account or sign in to comment