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.

VBScript for rxecuting a Script on a FM Runtime?

Featured Replies

Hello, I found a sample VBScript posted by

Wim Decorte that executes a script maker script on a database, however I tried modifying the VB script to open a runtime application rather than FileMaker itself.. is this functionality possible with a runtime, and if so, can someone please post a sample script as how to reference a runtime app?

I just started learning VBScript.. I am more into AppleScript but need to do some PC work :)-)

BTW. Thank you Wim for all the great stuff posted on this subject.

--

Best wishes,

Daniel Taylor

Hi Daniel,

Thanks for the kind words.

You can't interact with a runtime like you can with a normal FM file. It's a limitation of runtimes.

  • Author

OH sorry to hear that.. :)

Is there any other Windows side technology to trigger a script inside a runtime? The problem I have is that I have a client that has created a runtime solution and we are in the process of upgrading it, but we would like to have an installer trigger an export script on the previous runtime app, to extract all the records, I am certain we can provide text instructions on how to do it by hand, but it would be preferred to have it made automatically by the installer. This can be accomplished on the Mac Side with AppleScript.

No doubt Wim will come up with something better but, FWIW, I have a similar situation. The user has to rename the old solution folder 'Application Old'. The new one has an opening script which does this -

Perform External Script (Show All) [for each table in the old copy]

Import records [from each table in the old copy]

There are a few checks to make sure it all went well.

I figure the relatively minor user task is margnally better than trying to do the whole thing with VBScript or similar.

  • Author

I found something that might do the trick, there is an app called WinBatch Studio, it is basically a macro builder app that you an use to perform automated steps. Think of it as AppleScript for WIN It seems to be able to produce stand alone apps that you can distribute, not a cheap solution ($495) but not to costly if the project requires it. ;-)

Thank you guys for your answers.

Everything you can do with WinBatch you can do with VBscript. And usually executes faster too.

If you don't want to learn VBscript, then have a look at the free AutoIt instead of forking out 500$ for WinBatch...

  • Author

I certainly would like to learn VBScript, I am always looking into learning new stuff, after all this is what computers/life are all about. So maybe my number one question would be, can I launch any app using VB (I am almost certain ther answer is Yes), and then send a keyboard key combination? meaning a way to activate a menu item on the runtime, if so then I will strive to solve it with VBScript. I will certainly look into the other program you suggest. Thank you.

And the answer is: yes.

But before giving you some more detail, let's get the terminology right:

- VB: the real programming language. Requires Visual Studio and needs to compile into an exe in order to run.

- VBscript: a subset of the VB language, but built into the OS. You can write the code in Notepad and save it with the VBS extension and it will run (no compiling).

VBscript has a SendKeys command that you can use to mimic a user actually typing. So after launching your app you can use it to activate a menu and something on that menu.

Do a google on "VBscript sendkeys" and you'll find a ton of resources. Also look for the file "script56.chm" which is the help file that comes with the latest version of VBscript (v5.6, which you have if you're on XP with the latest patches).

Edited by Guest

  • Author

Excellent, thank you for the precision of terms, this is always the way to start things on the right foot. I will go ahead and look into your suggestions and will report my progress on my findings/development of the script. And I must say I am happy to know there is another way into controlling the runtime :)-) the ability to send keystrokes is something really useful and not found in AppleScript naively.

DT

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.