Jump to content

Pause while Send Event script runs?

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

Recommended Posts

I have a couple of situations where I use Send Event in a Script to allow users to select files or folders. I do it by having the Send Event trigger an external script.

Where I run into trouble is that the Filemaker script wants to just keep rolling along rather than wait for the external script to finish.

Workaround I'm using is to have a custom dialog pop up right after the Send Event, and it sits there until it's OK'd.

Is there a better way? Seems like it would sure be handy to have Send Event switch that tells it to wait for something to come back from what's going on outside.

Maybe there's some kind of loop that would work? But can't think of how. I'd like to avoid the extra dialog box if I can.

Link to comment
Share on other sites

On mac's can the external script call an internal script, which could then allow you to cut the original script in two. A less elegant way is to approximate the time of the external, and then use this:



Link to comment
Share on other sites

I thought about using Pause, but we're not using Status Area in this solution. ... maybe it would work though to have it pause, then user click a button for another Script that would terminate the first one... this would be better than the Custom Dialog route I'm using now I think.

Will try it.

Link to comment
Share on other sites

The Send Event execution simply does not wait for the result of what it executes. This is a sad area where the Windows version of FM is not up to par with the Mac version because FMI does not see the need to make it so.

To solve this you have to jump through many hoops but it can be done. The hard way by not using a VBscript plugin or the easy by using such a plugin.

What you'd then is create a VBscript in a field to do what you want and then either execute it through a plugin or:

- export field contents to the hard disk

- use send event to execute it (this is where your FM script stops)

- the vbscript does its thing and then calls another FM script

Link to comment
Share on other sites

I'm actually not familiar at all w/VB script, but use AutoIt some. I'm curious though, if the vbscript can call an FM script, why store it in a field and export it? Why not just store the sript in a file and execute it using Send Event? I already do this w/AutoIt scripts.

This maybe has something to do with how the vbscript plugin works?

Link to comment
Share on other sites

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