aharown07 Posted February 13, 2007 Posted February 13, 2007 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?
Genx Posted February 13, 2007 Posted February 13, 2007 (edited) 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 February 13, 2007 by Guest
aharown07 Posted February 13, 2007 Author Posted February 13, 2007 (edited) 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 February 13, 2007 by Guest
aharown07 Posted February 15, 2007 Author Posted February 15, 2007 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.
Genx Posted February 15, 2007 Posted February 15, 2007 Insert Picture script step does let them go hunt for an image...
aharown07 Posted February 15, 2007 Author Posted February 15, 2007 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?
aharown07 Posted February 17, 2007 Author Posted February 17, 2007 I've tried it a dozen different ways and there doesn't seem to be any way to make the script open a folder and let you browse for your picture. Looks to me like you can only browse when you're creating the script, not when you're running it.
Genx Posted February 17, 2007 Posted February 17, 2007 imagewin:/c:/documents and settings/all users/documents/myImage.jpg browseForImage.zip
aharown07 Posted February 17, 2007 Author Posted February 17, 2007 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...
Recommended Posts
This topic is 6491 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 accountSign in
Already have an account? Sign in here.
Sign In Now