December 29, 200322 yr Is there a way to retrieve a JPEG from a given URL (for example http://mySite/myPic.jpg) and store it in a container field? I'm not very good in applescripting, but I think that can be done... Thanks in advance for any help! Paolo.
December 29, 200322 yr Take a look at the Troi URL plugin. I messed around for a few days trying to get some internet data into a field. Couldn't get it done reliably. I then found the Troi plugin and had it doing what I needed in about 10 minutes. Dan
December 29, 200322 yr Author Wait! One more thing! Sometimes the URL doesn't lead directy to a JPEG, for example http://panpic2.feratel.at/panpic2/index.jsp?design=panpic&ID=5590&weatherData=off&stream=on&adv=off&camdata=off --- Btw: what I'm trying to do is a solution that collects pictures from webcams over the internet, several times every day, and stores them in a database. Thank you
January 5, 200421 yr Newbies In OS X, you can use URL Access Scripting to download the file, as below (in this example it downloads it to your user Documents folder) set docFolder to path to documents folder as string set theFile to docFolder & ":temp file.jpg" tell application "URL Access Scripting" activate set imageURL to http://mySite/myPic.jpg try download imageURL to file theFile with progress replacing yes end try try quit end try end tell You can then put a reference to the image file in your container field, as below: tell application "FileMaker Pro" set data of cell "Container" of current record of database 1 to file theFile end tell A possible problem with the above approach is that it does not put the actual data for the image in the FMP container, just a reference to it; move the original file, and you lose the image. AFAIK, there is no way to store the data in a FMP container using AppleScript without some help. If you want to store the data, you can use the GraphicsImporter OSAX (available for free at http://osaxen.com/graphicsimporter.html or at http://www.azug.gr.jp/~h-abe/freeware/gio/index.en.html), like so (after downloading the file): set theImage to giconvert file theFile tell application "FileMaker Pro" set cell "Container" of current record of database 1 to theImage end tell Good luck!
January 29, 200421 yr Hi try this Perform Applescript ( set the image_name to cell "image_url" of current record set this_URL to (the image_name) set the destination_file to ((path to desktop as string) & "image.jpg") tell application "URL Access Scripting" download this_URL to file destination_file replacing yes end tell ) Go to field ["image"] Insert Picture ["image.jpg"] exit record
January 29, 200421 yr Author thanks, with url access scripting I did the job. now I'm facing the problem that the stored images are much much bigger (in bytes) than the original jpeg file. Any idea??
January 30, 200421 yr Try turning off "store compatible graphics" in the FMP preferences. If you do, though, images pasted into the container by a PC client won't display on a Macintosh.
January 30, 200421 yr Author >Try turning off "store compatible graphics" it works! >images pasted into the container by a PC client won't display on a Macintosh. who uses pcs???
February 3, 200421 yr "who uses pcs??? " LOL people who can use more than one button on a mouse! Anyone found a soulution for this other than mr. Troy?
February 3, 200421 yr I tried to get from a url for days before I found the Troi URL plugin. I thought I might be able to if I messed around with Windows long enough, but it was so complex that I knew I'd never make it reliable for my end users. There was no way I'd be able to get them to set it up right, and I don't think it was going to run on 95, 98, or ME. So I went with Troi and I'm glad I did. The only problem that I've had is getting it to work in POST mode. But it works fine in GET mode, and that's all I've needed so far. Dan
Create an account or sign in to comment