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.

FM errors during Fetch automated upload.

Featured Replies

I am trying to upload a database to a web server via Fetch 4.0.3.

Filemaker 6 is initiating the applescript from a Filemaker script.

Everything works well, until an error appears. Fetch begins the upload, and in exactly 2 minutes Filemaker posts this error:

Fetch 4.0.3 got an error: AppleEvent timed out. (Error -1712).

Fetch is, in fact, still uploading, but my Filemaker script continues to the next step, sending an email telling the host to swap out the database. But it's not fully uploaded yet! So, I need some way to supress the error, or set a timeout somewhere longer.

Here is my code (I made the delay long to see if there is a change. Result: no change!):

tell application "Fetch 4.0.3"

activate

with timeout of 2300 seconds

open remote directory "ftp://myserver.com"

put into transfer window "filename and path" format Automatic without uniquename

end timeout

quit

end tell

It works fine when run from the Script Editor, just not from FM6.

Any ideas???

Thanks!

  • Author

I just solved my problem - it is a bug in filemaker that has been there for years! The FM Script work around looks like this for me:

I created the script as an application file on the hard drive.

Send Apple Event -> Open Application -> UploadDatabase.app

Pause [20 minutes]

Send email to swap the database

The file takes 17 minutes to upload now, so I gave it a little more for the future.

Works fine, but now I have to manage the extra file!

Here's a post that helped me discover this:

http://fmforums.com/forum/showtopic.php?tid/79628/

Hope this helps the next guy who stumbles on this problem!

Send Apple Event -> Open Application -> UploadDatabase.app

Pause [20 minutes]

Send email to swap the database

The file takes 17 minutes to upload now, so I gave it a little more for the future.

To make this more dynamic, you could split the script in two. The email would be in another script and the last line of the first script would call the app. When the app is done uploading it can then call the email script in FM. This way you don't have to hard code a wait in FM and hope it is enough.

This approach has the added benefit that if the app has an error, it could call another script in FM to send out another email...

  • 2 weeks later...
  • Newbies

I don't know if this is a better way but I think it is the most flexible. Just before every "Perform Applescript" step in a FileMaker script, I set a global field that I always call "g_AS_Done" to 0

The last thing that every Applescript does is set the value of "g_AS_Done" to 1. Then my FileMaker script loops until "g_AS_Done" is 1 or a loop counter hits some terribly high integer meaning something bad happened in the Applescript. FileMaker does not wait for the result of your Applescript.

If you can use a UNIX shell script there is another option. There is a FileMaker plugin/extension called "Shell" by Abstrakt. It is free and you can execute shell commands directly from FileMaker and the result is returned to your FileMaker database. I love it and it is much more reliable. I have even gone so far as to have a shell command that calls an Applescript.

Have you tried AppleScript "URL Access Scripting" to run the Upload from a ScriptMaker step?

I use it to manage a download with an import. So, it should work for an upload.

Good Luck.

Garry

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.