AnsweredAssumed Answered

Send Event -> Open Document (Mac)

Question asked by CarlMiller on Jan 31, 2012
Latest reply on Jan 31, 2012 by philmodjunk

Title

Send Event -> Open Document (Mac)

Post

Novice running FM Pro 7 on Mac OSX 10.68.

Trying to setup a script to open a document, where the document name is the value of a field. The documents will always be located in the same directory as the FM file. 

Not working:

Send Event ["Preview"; "aevt"; "odoc"; GetField ("user_view::File Name")]

The Mac app "Preview" comes to the front, but no document opens.

When I specificy a file name in the script as follows, it works fine:

Send Event ["Preview"; "aevt"; "odoc"; "file.pdf"]

But, of course, I need the script to grab the file name from the current field "File Name".

Can someone point me in the right direction?

Thanks.

Outcomes