Pyorkie Posted March 18, 2016 Posted March 18, 2016 Hi Is there any way of executing a file from the database. AS you can see I want to go directly to the file/image at the location on my computer so as to edit or whatever. Thanks in advance for any help pyorkie
Lee Smith Posted March 18, 2016 Posted March 18, 2016 You need to provide what you are trying to do, and perhaps what you have tried. Start by reading FileMaker Help on Open File, Open URL, Go To Related Record HTH Lee
Pyorkie Posted March 18, 2016 Author Posted March 18, 2016 Hi Thanks for the reply. OK I made a database of all the family history pictures my wife has on the computer (they are all in different locations on the computer (different drives and folders). I made it so you can search for the files which show up in the interface (location and the picture). What I would like is so that my wife can click on a button and the to have the file/picture/PDF/Doc open in windows, so that she won't have to go throught the computer and open them manually. I redesigned the interface with a red button next to the location. see screenshot. Thanks again for any help. pyorkie
Lee Smith Posted March 18, 2016 Posted March 18, 2016 Ok, then I would start by looking at the Help on Container Fields. I just reviewed a video yesterday about container fields, Interactive Container Fields HTH Lee
Pyorkie Posted March 18, 2016 Author Posted March 18, 2016 Hi Lee Thanks for the info ........ watched the video and checked the help ..... but still doesn't help with what I need to do. To find some thing on your computer you need to go to .... example (c:>pictures>1920>picture1.jpg) ... that is 3 steps ....... what I need is to click once (on the button) and filemaker will read the location (from the database) go there and then read name of picture/file from the database and then go there, just to highlight the file name. I hope this is a little clearer ..... I know what I want but having trouble explaining. pyorkie
Wim Decorte Posted March 18, 2016 Posted March 18, 2016 No, it's not very clear where you are stuck... The fact that something takes a number of steps shouldn't block you: you combine those in a script. Do you currently have a script you're trying to put together and if so can you post it here so we can check it out?
Pyorkie Posted March 18, 2016 Author Posted March 18, 2016 Hi Thanks for the reply. OK pic2 is where I get to now ... hopefully pic1 explains a little better where the items are. As for the scripts I have had little to do with this version and little in general. What I got now is (please don't laugh): Get Directory [$dir[Family::Name]; Family::Locatgion;Family::Location] I want to be able to click the red button (or anywhere) and have the program goto the actual file position no matter where it is on the computer and highlight it so I just need one click to edit/open/run whatever. Thanks for your time pyorkie
Lee Smith Posted March 18, 2016 Posted March 18, 2016 14 hours ago, Pyorkie said: I want to go directly to the file/image at the location on my computer so as to edit or whatever. Do you want to open the picture, or open the folder?
Mike Duncan Posted March 18, 2016 Posted March 18, 2016 Send Event [ “aevt” ; “odoc” ; "cmd /c start " & Quote ( Family::Location ) ]
Pyorkie Posted March 18, 2016 Author Posted March 18, 2016 Hey Thanks to both of you for your help. To Mike: I will give it a go and get back to you. To Lee: Just to open the folder then select the file/picture no real need to open the picture/file this can be done once it is selected/highlighted. It is basically so that the picture/file can be edited once found. Again thanks ........ your more than helpful. pyorkie
Pyorkie Posted March 19, 2016 Author Posted March 19, 2016 Hi Mike I must be a bit dumb ...... not having much luck ..... tried all combo without luck. I need to get the info from the Location field (Family::Location) then to get the info from the Name field (Family::Name) join them together eg: (Location Field)\(Name Field) and then to open that Location and find the name ......c:\my pictures\(find)picture.jpg pyorkie
Lee Smith Posted March 19, 2016 Posted March 19, 2016 You’re not dumb. AFAIK, opening a Folder using FileMaker’s native functions can’t be done (now watch someone prove me wrong, I hope . Perhaps a Plugin like this one can do it https://www.mbsplugins.eu/FilesLaunchFile.shtml, if not, there are others. You might be able to do this using VB Script, or AppleScript. Please post your whole File Path as it shows up ub GetField ( "Image" )? AND Then tell us how you want it parsed out to which fields. Lee
comment Posted March 19, 2016 Posted March 19, 2016 40 minutes ago, Lee Smith said: opening a Folder using FileMaker’s native functions can’t be done (now watch someone prove me wrong
Pyorkie Posted March 19, 2016 Author Posted March 19, 2016 (edited) Hi Lee Sorry not quite sure what your asking ..... all the files/pictures in the container field are in different places on the HDD just to show I've included some screenshots of the different paths of the files/pictures (in the Family::Location field) which also show the names of these files/pictures (Family::Name field). As you can see that not all of the files are named correctly yet ...... that is why I want to be able to do this. As for the link it is great and I think I can work with them to do what I want. When and if I work it out I will post the script/plugin so that others may use it if they find the need. Your and everyones help has been of great help. Thank you all. pyorkie Edited March 19, 2016 by Lee Smith I removed the screen shots, you already posted them
Mike Duncan Posted March 19, 2016 Posted March 19, 2016 14 hours ago, Pyorkie said: Hi Mike I must be a bit dumb ...... not having much luck ..... tried all combo without luck. I need to get the info from the Location field (Family::Location) then to get the info from the Name field (Family::Name) join them together eg: (Location Field)\(Name Field) and then to open that Location and find the name ......c:\my pictures\(find)picture.jpg pyorkie If you have the full path to the file you want to open, that is what you will want to pass to the send event step I mentioned before. The "cmd /c" part tells the windows command prompt to run with the string you give it, so it should work the same as pulling up the command prompt and entering in "start " and your full path to the file. It should open in the default application for that type of file, which is what you want, right? Mike
Lee Smith Posted March 19, 2016 Posted March 19, 2016 Thank you comment, I spent countless hours looking for an answer like this because, I was pretty sure I had seen one. I figured if one existed, that you would point us in the the right direction, provided of course that I wasn’t having a senior moment. Hopefully it will be what pyorkie needed. Quote you can open the enclosing folder - see: http://fmforums.com/forum/topic/79551-open-calculated-file-directory/#entry370547 but to select the actual file you Lee
comment Posted March 19, 2016 Posted March 19, 2016 3 hours ago, Lee Smith said: Hopefully it will be what pyorkie needed. I doubt that. AFAICT, they want to open the enclosing folder and select the file, without opening it. Filemaker (on its own) can either open the enclosing folder or open the file. To select a file (without opening it) they will need to use OS-level scripting. Or perhaps there's a plugin that can do that.
Lee Smith Posted March 19, 2016 Posted March 19, 2016 Isn’t that what the OP said? On March 18, 2016 at 6:23 PM, Pyorkie said: Is there any way of executing a file from the database. AS you can see I want to go directly to the file/image at the location on my computer so as to edit or whatever. and here. On March 18, 2016 at 8:35 PM, Pyorkie said: What I would like is so that my wife can click on a button and the to have the file/picture/PDF/Doc open in windows, so that she won't have to go throught the computer and open them manually. I redesigned the interface with a red button next to the location. see screenshot. If not, I’ve wasted a lot of time and the OP needs clarify.
comment Posted March 19, 2016 Posted March 19, 2016 1 minute ago, Lee Smith said: Isn’t that what the OP said? They also said (emphasis added by me): On 03/18/2016 at 8:08 AM, Pyorkie said: what I need is to click once (on the button) and filemaker will read the location (from the database) go there and then read name of picture/file from the database and then go there, just to highlight the file name. On 03/18/2016 at 2:49 PM, Pyorkie said: I want to be able to click the red button (or anywhere) and have the program goto the actual file position no matter where it is on the computer and highlight it so I just need one click to edit/open/run whatever. 22 hours ago, Pyorkie said: Just to open the folder then select the file/picture no real need to open the picture/file
Pyorkie Posted March 19, 2016 Author Posted March 19, 2016 Hi all I hope that I've just started a discussion and not a argument ....... I thank all of you you've been a great help ....... and helped me understand scripts a little better. The documentation is not very helpful. Again thank you all ......... will let you know how I get on. pyorkie
Wim Decorte Posted March 20, 2016 Posted March 20, 2016 No argument I think what is not clear from your descriptions is what you really want as the end result: 1) do you want to have the picture automatically opened in an external program for editing? ==> in that case you do not need to go through the steps you have been trying to achieve, there is no need to s show a folder/file picker. 2) or you want to do something else?
Pyorkie Posted March 20, 2016 Author Posted March 20, 2016 Hi Wim 1. picture/file to open in an external program, for editing/renaming etc ... that would be great if possible. I mported all (6022) pictures/files into the container call "image". which is tied to the "name" and "location" fields. What I would hope to achive is .... to be able to open the picture in external program and then be able to edit. You guys are great ..... thanks for the continued help. pyorkie
Recommended Posts
This topic is 3168 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