aholtzapfel Posted September 8, 2007 Posted September 8, 2007 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
Mighty-Mouse Posted September 11, 2007 Posted September 11, 2007 Hi , i downloaded your file and tried it. but it didn't work because start process & import script were having a missing function in their script. can you tell me what it is ? regards, kyle
aholtzapfel Posted September 12, 2007 Author Posted September 12, 2007 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 ]).
Mighty-Mouse Posted September 12, 2007 Posted September 12, 2007 i got it. fmp 9 specific. thanks, kyle
aholtzapfel Posted September 13, 2007 Author Posted September 13, 2007 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
Recommended Posts
This topic is 6323 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 accountSign in
Already have an account? Sign in here.
Sign In Now