December 3, 200718 yr I would like to open and close an application using a filemaker script (I am using windows XP). I'm assuming you have to use a VB script. So I am wondering if someone can give me an example code of how to open and close an application, or point me to some online literature so I can get myself up to speed. Thanks Jeff England
December 4, 200718 yr Send Event script step (Windows) should serve. The help documents explain its use. Keep in mind that if ever distribute to an Apple machine, you have to test for this...
January 10, 200818 yr Most applications can be launched with a command line and that's where the Send Event can help. You can specify a valid command line and it will work. For closing an app it may be more difficult, check the app's documentation to see if there is a command line switch for that. You can also use a VB script, check out my website for some resources on how to get started creating and executing a VB script from inside FM. Let us know how it goes!
January 13, 200818 yr Author Alrighty thanks for the info guys my problem is closing the app but i'll take a look at your site, thanks for the link. Jeff England
January 14, 200818 yr One way of closing an app is to use VBscript's "AppActivate" to bring it forward, followed by a SendKeys command sending ALT-F4 (the universal command for closing an app). Don't forget to handle any prompts that the other app might throw up (like saving, "are you sure",...)
Create an account or sign in to comment