Jump to content

send DDE to insert photo?


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

Recommended Posts

I'd like users to be able to click a button that takes them to a folder where they can select an image file and then have it inserted into a field in the database.

I've got a way to do that now that involves using Send Event to run an AutoIt script ... which grabs the path name after user file selection and stores it on the clipboard.

Then my FileMaker script plugs the clipboard into a field and uses it in a variable to provide the path for an Insert Picture.

Well, this works OK I guess, but is there a better way? Seems like Send DDE Execute would provide a better route, but can't find any info on how to do that. Anyone know where to look?

Link to comment
Share on other sites

vbscript might be more useful here -- show the dialog, write the result to a text file and then import that text file.

Out of curiosity, why not just use the insert image function provided by FileMaker?

Edited by Guest
Link to comment
Share on other sites

Why not use insert image? Well, the Insert Picture script step doesn't allow you to go hunt for the picture (or have I missed something?) but the Insert Picture menu item, doesn't take you to a particular folder either.... plus users have to remember to use the menu for that. Sounds simple, but, they're used to a button being right there next to what they want to do so... maybe I'm being silly but I anticipate lots of phone calls "Tell me again how to insert a picture?"

So I'd like to have one click that goes to a particular folder (Shared Pictures... I know from experience that they have a hard time finding that folder) and then one more click inserts the picture they select.

I don't know much about vbscript, but I'll do some reading.

Thanks.

Edited by Guest
Link to comment
Share on other sites

A partial answer to my own question.

Microsoft has a DDE reference at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/dynamicdataexchange/aboutdynamicdataexchange.asp

Still don't know how to do it, but this is where to learn about DDE.

At the moment, looks better than learning VBscript.

Link to comment
Share on other sites

OK, great. How? It says "Click Add File to add one or more picture files..." so I figured it needed a complete path to a particular file.

And if I put a path like this

imagewin:c:/documents and settings/all users/documents

It doesn't work.

Must be keying something in wrong?

Link to comment
Share on other sites

Genx,

Thanks for the attachment. I see that if you don't specify a file or path at all in the Insert Picture step, the script does give you a file open dialog and let you browse.

The problem w/that approach, though, is that it doesn't let you decide what folder it will start in. (Many of the users I have in mind will not be able to find their way to the right one)

I'll have to put it on the wishlist for a future release... the Insert Pic script step should allow a path to a folder w/o specifying a file.

Anyway, got nowhere on DDE research so for now I'm using my Send Event w/AutoIt, clipboard & paste. Could have it write to a txt file & import instead (just like VBscript), but I'm not sure there's really any need to do that. Nobody's doing anything important with the clipboard in this part of the application so...

Link to comment
Share on other sites

This topic is 5707 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
 Share

×
×
  • Create New...

Important Information

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