Jump to content
Server Maintenance This Week. ×

Update System for Runtimed Files


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

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

This topic is 6312 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.