January 17, 201015 yr Newbies The problem is to open a document on Windows from FileMaker based on a stored pathname. This is no problem if you store the document in a FileMaker container (even as a reference), but can be problematic if you don't. I'm using FileMaker as the presentation layer for a MySQL database, so this doesn't work. I searched various forums and got some really useful hints, but not the complete picture. I thought I'd post this so that others with the same problem might not have to go through so much effort. In the Send Event script dialog, you can select a file or a calculation. File works fine. The problem comes with calculation, as this is sensitive to file paths with spaces or special characters. There are also differences between local and network files. Things to remember: 1. The separators need to be rather than /, which are used in the file: or filewin: specifiers generated if you select a file instead of a calculation. 2. If you select a local file as a file, it will generate something like filewin:/C:/... So you would think that the path for the calculation should be C:... but that would be wrong. It should actually be C:... 3. If you select a networked file as a file, it will generate something like filewin://computername/drivename/... In this case the path for the calculation should actually be computernamedrivename... 4. To get around the space and special character issue, insert " at both ends: """ & file_path & """
June 12, 201015 yr Thanks but it's still not working for me. Here's what I've tried. filewin:C:Documents and SettingsAlanMy DocumentsMy VideosVideosSet_Yourself_Free.flv filewin:C:Documents and SettingsAlanMy DocumentsMy VideosVideosSet_Yourself_Free.flv file:VideosSet_Yourself_Free.flv
June 13, 201015 yr From another forum: I wouldn't do it with Send Event, myself; I'd use Open URL ["file://C:/Documents and Settings/Alan/My Documetns/My Videos/Set_Yourself_Free.flv", no dialog"] Looked great on paper but it doesn't work either. This seems so simply but it just doesn't work.
June 13, 201015 yr Have you tried creating an export or import script step, pointing the file ref part to the file in question, and actually looking at it?
June 14, 201015 yr Author Newbies Gee, my original post wasn't sufficiently detailed. Here's a set of script steps that demonstrate how to do it: Set a variable $FilePath to the Windows pathname: C:Documents and SettingsUser NameDesktopFile.pdf In the Send Event script step, select Calculation and set the calculated value to the following: """ & $FilePath & """ That's all you need. This is the strange thing. The Calculation option takes a full path name, not file:, filewin:, or anything similar. Sorry for the imcomplete description.
November 8, 201213 yr Are you sure it goes like this, with 3 brackets? Not likely, doesnt work for me at least. Unfortunatily, two brackets dont solve my problem neither. I need to get the file with Send Event script that has the blank spaces in its name.
Create an account or sign in to comment