Jump to content
Server Maintenance This Week. ×

Capture image using webcam and put it in a Container Field


This topic is 993 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I was just wondering if there is a way to set my image container field to launch the webcam on my PC and capture the image (take photo) instead of manually inserting a photo? If there is a way to do this I would appreciate it if you could tell me or point me to where I can find the solution for it.

Much appreciated.

Using Filemaker Pro 18 on Windows 10 Pro

Link to comment
Share on other sites

Hey there! Yes, this is definitely possible. 

I use a utility called CommandCam (https://batchloaf.wordpress.com/commandcam/) to capture an image from a connected webcam. 

I have used it with a few different webcams, external USB and built-in to laptop without any issues. 

 

The documentation is great, and you should be able to get things up and going fairly easily. 

 

I use it in combination with ImageMagick, so that I can take a photo, process it (crop and resize), then import to FM. 

 

The process isn't perfect, but here's what I found works:

 

In the FM capture script:

-Call a batch script (.bat file) using the Send Event script step.

-The batch file goes to the directory where the CommandCam utility is stored, runs it with the specific switches (e.g. silent, and the desired filepath). I do my ImageMagick processing and output the file. I use 'timeout' in the batch file for 10 seconds, then delete my temporary photo files, and exit the batch file

-After the Send Event script step, pause the FM script for 5 seconds, to allow the batch file to run

-Resume the FM script

-Insert image (store in your container) - I build in logic for error checking (e.g. if photo doesn't exist)

By the time your FM script has finished, the 10 second timeout in the batch file has completed, and the batch file exits. 

 

Hopefully this makes sense... I'm on mobile, but can upload some screenshots/demo files if you'd like. 

  • Like 1
Link to comment
Share on other sites

Thanx Matt for the steps provided. If it works, then that's great!! I will definitely try it.

In the meantime Im still looking for alternatives. I was hoping for a faster/easier step that doesn't rely on other external utilities/software or timings... maybe a filemaker plugin?

Link to comment
Share on other sites

  • 2 weeks later...

This topic is 993 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.