Jump to content
Server Maintenance This Week. ×

Windows Automation


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

Recommended Posts

Attached is a File done in FM9. It creates a vbs script allows the running of some action, and returns a result to the file. I have used script variables so that values within the vbs script are more easily accessable and the scripts can be copied and pasted between files. (only the variables should need updated)

This example does not include any automation of any other apps, rather it is intented to be a starting point. (If I get the time I may do an example with an excel)

I have used the Temp folder to hold the VBS script as well as a text file. (So this file will only work in FM9 and on a windows OS)

Using this technique, I have been able to (among other things)grab values from a cell in an excel spreadsheet and return it to filemaker. This technique can be used to automate any windows app that has an object model open to a VBS script.

(WARNING: using script folders can cause the VBS script to run the wrong FM script, breaking this technique.)

Automation_with_VBS.zip

Link to comment
Share on other sites

This is the reason this example will only work in FM9. The missing piece is the path to the temp folder (New in 9). In the past I had used the "My documents" folder. (this works as will any path) If you change this example, you will need to change the path in the import, the export of the script(the one you pointed out) and in the VBS script(where the text files created, Set Variable [$VBS; the entire vbs script is here ]).

Link to comment
Share on other sites

Here is an example of running a vbs script on a file that is stored in a container field.

The File in this example is an excel spreadsheet.

(This file will only work in FM9 and on the windows OS and excel must be installed)

This is not what I would call an ideal way of dealing with spreadsheets but this method can be adapted to deal with any file stored in a container that has a scriptable application associated with it.

vbs_on_file_in_container.zip

Link to comment
Share on other sites

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