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.

Update System for Runtimed Files

Featured Replies

I'm trying to make an update system for a set of runtimed files we use at work. I've made a Web Viewer download a text file from my server, parse it and see which files and been updated, the next stage of my plan was to download the files, close the open ones and replace them with the downloaded versions.

But I got stuck with the downloading. I've tried using an internetexplorer object from VBScript, but had no luck. Just wondering if anyone has done anything similar or has any ideas/tips on how I could do this.

Thanks

Can you post the code that you've been using?

I can see how you can script IE to download the files for you but what do you expect to do from there?

  • Author

The code I've been trying and keep chaning about is:

dim ie

set ie = createobject("internetexplorer.application")

ie.visible=false

ie.navigate2("http://mwfit.net/test/updates.txt")

do while ie.busy=true

wscript.sleep 60

loop

call ie.execwb("saveas",2,"c:updates.txt")

ie.quit

But I get an error on the saveas line, on the internet I keep seeing different ways of having that line, but so far none have worked.

My plan is once the file is uploaded, to run a FM Script to close the other file, replace it with the downloaded one sing VBScript and then open the new file using another FM Script. So then they would be using the updated files.

do you have an FTP server? Then you could use FTP to download the files instead of relying on HTTP.

I've never used IE's support for OLE calls but it seems to me that your "saveas" should really be IDM_SAVEAS except that VBscript doesn't understand named constants so you'd need to find the numerical equivalent of IDM_SAVEAS. But that's just a guess on my part.

Let us know how it goes and if we can help you further along.

  • Author

I changed "saveas" to 71 which is IDM_SAVEAS, but then I get a new error:

Error: Trying to revoke a drop target that has not been registered

We do have a ftp server, how can I use VBScript to connect to that? Using the built in Windows FTP fucntions?

Thanks for help btw :

yes, using the command line FTP client would be the way to go I think. Probably faster download too.

  • Author

I have a vbcript which can download files fro my ftp server now, as well as a filemaker script which parses a text file downloaded in the webviewer.

Is there anyway I can inform filemaker when the ftp download is complete? So I can then close the running filemaker file and replace it with the downloaded copy.

You're a little handicapped in this since you're using runtimes. With regular FM Pro you can have your VBscript call a FileMaker script (through FileMaker's ActiveX implementation), but that's not available in runtimes.

Not sure what the best way to do it is... When the FTP command is done in your VBscript, just use the shell to "AppActivate" your runtime and use "SendKeys" to ALT-F4 (close) it?

  • 2 weeks later...
  • Author

I've decidd to now code a Plugin to do the downloads, which returns data back into FileMaker. Once I've finished it and added lots of error checks I may put up for download somewhere in case other people want to use it.

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.