Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

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 & """

  • 4 months later...
Posted

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

Posted

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.

Posted

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?

  • Newbies
Posted

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.

  • 2 years later...
Posted

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.

  • 2 weeks later...

This topic is 4389 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
×
×
  • Create New...

Important Information

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