Solved

image from URL with get picture

Posted on 2004-10-14
12
480 Views
Last Modified: 2008-02-01
Hi

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?

image:http://www.ocftp2.com/webcam/sk60/sk60_CAM1_2004-09-18_141428.jpg
imagemac:image:/http://www.ocftp2.com/webcam/sk60/sk60_CAM1_2004-09-18_141428.jpg
0
Comment
Question by:charlesdarbyshire
  • 4
  • 3
  • 2
  • +1
12 Comments
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 40 total points
ID: 12311691
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)
http://www.cnsplug-ins.com/products.htm?product=UPLOADit#description
http://www.troi.com/support/faq2.html#turlindex
0
 
LVL 9

Assisted Solution

by:prifre
prifre earned 40 total points
ID: 12311696
Hi,

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. www.troi.com

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
/prifre
0
 

Author Comment

by:charlesdarbyshire
ID: 12313155
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 yet....so 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??


0
 
LVL 19

Accepted Solution

by:
billmercer earned 45 total points
ID: 12315860
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.

http://www.milleniumhandandshrimp.com/get%20pic%20test.zip

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.
http://www.hiddensoft.com
0
 
LVL 19

Expert Comment

by:billmercer
ID: 12315873
BTW, if you don't like this approach, using wget or cURL should not be too difficult. I have an example around somewhere...
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 9

Expert Comment

by:prifre
ID: 12319648
Hi,

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
/prifre
0
 

Author Comment

by:charlesdarbyshire
ID: 12320743
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 webserver....so 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...
0
 
LVL 19

Expert Comment

by:billmercer
ID: 12321007
"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?

 
0
 
LVL 28

Expert Comment

by:lesouef
ID: 12321196
I think he was hoping for a solution working exactly as importing from a local path....
0
 
LVL 19

Expert Comment

by:billmercer
ID: 12632253
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.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 12827684
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?
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now