image from URL with get picture


I have just installed FMP7 and all good - apart from it doesn't solve a problem i have  --

I need to get an image of a web page into a container filed...

I think that the get picture script step should resolve it - but I can't make it work..

has anyone solved this?  something like the following should work surely?

Who is Participating?
billmercerConnect With a Mentor Commented:
I have not been able to get FileMaker to accept URLs for file references. But here's a workaround that might do what you want. You didn't specify platform, I'm using Windows.

The concept: When you use the "insert picture" script step and don't specify a file reference, you get a dialog box for browsing to the location. At that point, you can paste or type the image URL into the dialog, hit OK, and Windows will use IE to grab the URL. Filemaker will then retrieve the image from the local IE cache, and store that in your field. It works like a charm.

All you need to do to make it completely automatic is create an external macro or utility that will do a paste and enter after a short delay.
Then, in Filemaker, copy the URL to the clipboard, use a "send event" script step to call the macro, and then immediately open the "insert image" dialog with no file specified. A second later, the macro kicks in, pastes and submits your dialog box, and the picture is downloaded and stored in your field. Not bad for a few minutes' work.

I created an example using Autoit v3, and it actully worked right away the first time!It's just a simple example, it could be made more elaborate.
Here's a link if you want to download my example. 

There's three files in the archive, a FM7 file, an AU3 script, and a compiled .exe version of the script. The .exe file is not a trojan or virus, but if you prefer you can install AutoIt 3 and compile the source yourself just for peace of mind.

Put the URL of the picture in the URL field, then click the button, and if the script file is in the same folder as the FM7 file, it will download and store the image in the container field.

If you're on a Mac, you should be able to do something similar with Applescript. I don't have FM 7 on my Mac, so I can't try it myself. If it works, you could even have both the applescript and Autoit versions in the same folder, with two separate references, and it would then be cross-platform compatible! Hooray!

AutoIt 3 - Like Duct Tape for Windows. 
lesouefConnect With a Mentor Commented:
As far as I know, you can only import files with a local or Lan path, not from the web directly.
The closest thing I can see now is to store the path and use "open URL" to show it in yr browser. But I guess you want to download it in your base.
Apart from that, you'd better have a look at 1/3 party plug-ins, maybe these 2 can do the job: (never used it myself) 
prifreConnect With a Mentor Commented:

I have just briefly checked out the new possibilities with FM7, like the image-importing, but as far as I have seen, there is still no substitute for where I have with FM6 previously used Troi. And Troi for FM7 is great too.

I would very warmly recommend the tool that can create thumbnails and import images based some nifty additional scripting - on the fly. It is worth it. I believe for your problem - if you need to import a few images, it does not matter - you might do that manually using even copy&paste, but to REALLY use scripting and import images, FM built in possibilities I believe are too limited.

with a smile
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

charlesdarbyshireAuthor Commented:
it kills me that this is so hard... the troi plug in won't get it from a web page url, and i think that the uploadit should make it happen - but doesn't far as i can tell

be good to get a look at some scripts of people that are doing this already - ( i can't believe I am the only one!!)

else I am going to have to use something like wget  then import which seems a stupidly long way around our problem.....

any other ideas people??

BTW, if you don't like this approach, using wget or cURL should not be too difficult. I have an example around somewhere...

I recall a similar situation, but where they instead of " need to get an image of a web page into a container filed... " we solved it via storing the url to the webpage in FM.
This has a lot of advantages - yo have the images as separate files (easy to update) - storage, etc.
Via Troi we created thumbnails into container fields and used scripting to quickly "semin-synchronize" ie update thumbnails based on the contents of the folder with images, where the mail field that it relates on is the same as the file-name.
So - when people work with FileMaker, they seee the thumb and it is quick. And when they want to see the BIG picture, they click a button in FM, that calls an URL that shows the big pic off a webserver inside the browser.

(I do NOT think storing big images into FileMaker is a good idea...)

with a smile
charlesdarbyshireAuthor Commented:
thanks all for the posts.. but what i want to do this for is - to be able to view a picture off line... i.e. go online... collect the image, then view it off line... ( and also record information about the image for future use. ) this image may be over written in the future on the the link soln will not take me back to the correct picture...

It's really a shame you can't get it a picture from a URL...
"It's really a shame you can't get it a picture from a URL..."

Maybe I misunderstood your question, but the solution I proposed does exactly this.
If what you want is to take a URL to an image, grab the image from a web site and store it in a container field in FileMaker, then the solution I described will do this. You can retrieve a picture from a web site and store it in a container field in FileMaker. Once the image is retrieved from the server and placed in the container field, it's stored locally, and is not dependent on the web server any more.

Is there something more you need beyond this?

I think he was hoping for a solution working exactly as importing from a local path....
charlesdarbyshire, this question is getting old. If you don't like the answers you got, you should probably request that it be closed and the points refunded.
What he was expecting has no easy solution, so he won't answer. What is here is the whole list of workarounds.
Even if we'd like to know what happened then, without any answer...
I would recommand to split the points, since I am against points refunding if the guy does not even answer.
When we spend some time for askers, even if proposed solutions are not 100% adequate, the minimum is to answer or claim for points refunding?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.