Home Back E-mail



Copying web images into a FileMaker Pro (FMP) container field


Assume you have a list of website images you want to insert into a database (i.e. real inserting, not just references).

Assume you are lazy.

You can perform this task automatically by using the AutoIt freeware macro generator (www.hiddensoft.com/autoit).

The principle is as follows:
  • Open the browser with the URL containing ONLY the image
  • Copy the image
  • Paste in Word, using Word as an intermediate copy container because FMP will not accept images copied from a browser (don't ask me why!).
  • Copy from Word
  • Paste into the FMP container field
So the script in FMP basically goes like this (comments in italics)
Open URL [No dialog, "www.your-domain.dom/images/your-image.jpg"]
Of course you can use a field value instead of a fixed URL!)
Send Message ["copy-url-image.exe", "aevt", "odoc"]
This runs the compiled macro (source).

The macro source file is named "copy-url-image.aut" and is a plain text file:


AutoIt source code Comment
Sleep, 10000 Wait 10 seconds, should be enough to load the image in the browser; make longer+ recompile if needed
Send, ^a Select all
Send, ^c Copy all
Send, !{F4} Close browser with Alt-F4
Run, C:\\Program Files\\Microsoft Office 2000\\Office\\winword.exe Run Word, open a new file; double backslashes are needed to produce single backslashes
Sleep, 2000 Wait 2 seconds
Send, ^a Select all
Send, ^v Paste
Send, ^a Select all
Send, ^x Cut
Send, !{F4} Close Word with Alt-F4
Sleep, 2000 Wait 2 seconds
Send, !n Say Alt-N (=no) to the "Save?" question
Paste [Select, "containerfield"]
That's all.

Good luck!

Back to the list of my FileMaker Pro trouvailles

Home Back to Christoph Bouthillier Top

© 1997...