Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Filemaker ActiveX Automation

Featured Replies

  • Newbies

Wanted to invoke a FM script on a specific time.

so looked for the example given in the following link

http://www.filemaker.com/help/08-Scripts11.html

to trigger a FM script through the Activex component. But could not proceed beyound the code line

Set FMDocs = FMApp.Documents. But couple of times we have crossed this line of code also without any error but subsequently we do get an error at this line of code

myOpenFile.DoFMScript ("First Script").

Tried this same set of code in both VB 6 and a VB.net application but have not been successful to launch the script even though the application launches and the document opens up.

I am stuck on this and not able to move ahead.

Any help or views will be great.

thanks a lot

siva

Hi Siva, you need to mention what error you're seeing and also what version of FM you're seeing this with.

Having said that, there seems to be a problem with FM 8 and .NET languages (VB.NET, C#) that I and others have seen. Haven't had the time yet to figure out if it is a FM bug or if it is something in .NET's COM interop.

  • Author
  • Newbies

Hi Wim ,

I am using VS 2003 with FM 7 and 8.

It throes the "Server threw an Exception error". I am also not sure as to why and who is responsible for this error to popup. I also tried this out with VC++ 6.0 and .net but did not get it to work. Will it work with FM 6.

Any how i tried the same by installing FM 6 and used the sample code given from the FM web site and changed few library setting and it did work, i am tying this with vc++ 6.0 now accessing FM 6

thanks

siva

Edited by Guest

FM6 has a different type library (DLLs) than FM7/8. FM7 and 8 share the same one since there have been no changes in ActiveX features.

I've never had the error with VB6 though using FM7/8. Only with .NET languages. Always the same error as you're seeing.

  • Author
  • Newbies

Hi Wim,

i Tried it in VB.net 2002 and VC++.net 2002, and it worked in VB.net but not in VC++.net with FM7/8 . pity is that it threw an error at the Open Method of documents when i clearly suppilied the required parameters. the error was "invalid Number of Parameters". the same statement worked in vb.net 2002. yes it might be of the way visual studio.net generates those Interops, and this is what creates problems.Can you suggest anything else ?

Thanks

siva

Edited by Guest

I can't see how changing VS versions would cause the "invalid # of parameters" error. That has to do with ... well... not providing the necessary parameters to the Open command :)

Remember that FM7/8 now has both an account name and a password so you need to pass 3 parameters in total:

- file name

- account

- pw

(whereas in FM6 you needed only the file name and the pw).

The ActiveX model described in the help file is correct:

Open(filename As String, accountName As String, password As String)

But all the examples in the help file are wrong.

As to the other error "Server threw an execption", I get hit by that too, but it is inconsistent. When it happens it happens all the time, but sometimes it just does not happen. I'll send you a little test app back-channel. I wrote it yesterday in C# (VS2005) and it does not produce the error.

Never happens in VB6 either. Just VB.NET & C# in VS 2003 & 2005. So no help there until we can figure out a way to make the error totally reproducible. Then we can log it as a bug and talk to FMI.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.