Jump to content
Sign in to follow this  
EasyEdE

Excessive button clicks causes script hang up

Recommended Posts

I have a layout with 6 buttons. Each button's script contains a conditional statement that if not met displays a message with a specified duration that varies from 3 to 10 seconds. The message is displayed in a text field, not as a dialog box. It works just fine EXCEPT if someone is finger happy and clicks on one of the other buttons before the specified duration for the first click is completed the script hangs up and requires the user's intervention by clicking on the script "Continue" button which is unacceptable since the status area will not be accessible to the user.

Freezing the window when the script starts doesn't help and I don't want to use a "Click here to proceed" button in lieu of a preset pause duration. Any suggestions will be greatly appreciated.

Share this post


Link to post
Share on other sites

If a user had to stare at a text message for 10 seconds x amount of times per day I would expect they would try to click something else to get past it.

If you must, flip them to a different layout to display your message with no buttons. Then flip them back after the duration. (or with an OK button).

I'm assuming you are doing this as a workaround to not having a dynamic dialogue box in FileMaker <6?

Share this post


Link to post
Share on other sites

1. ScriptMaker is single-threaded. It can handle one event at a time and does not queue event requests.

2. When a ScriptMaker script is paused another event can be initiated.

3. While trevorg's layout suggestion will be effective for that one client, if the db's are being shared by multiple clients, another client could initiate a script during the pause.

Share this post


Link to post
Share on other sites

We have this problem with barcode systems that automatically trigger scripts after a scan (Comman-1 or Control-2 postscript appended by the scanner). What you need to do is set a semaphore (flag) when a button is clicked and reset at the comclusion of an operation. This semaphore is tested at the beginning of each of the button scripts and immediately exits the script if it is set. The only thing is that you have to make sure the semaphore is reset, even if the user quits while paused in the script. We usually put the user in a paused loop to disable menu or keyboard quits or window closes.

-bd

Share this post


Link to post
Share on other sites

I'm sure this response could very well deserve it's own Post, but since it follows the topic of your response I will leave it in this thread.

I would like some clarification on the whole single threaded ScriptMaker issue.

I understand that: If a single copy of FileMaker is running a script, and the script is paused, or taking a long time to complete, and another script is initiated that yes, the scripts do not get qued or run simultaneously. That part is acceptable to me.

I also understand that: If a single copy of FileMaker is sharing this DB, that yes, they do share the same ScriptMaker engine, and therefore multiple scripts do not work when run simultaneously. This also goes for FileMaker web scripts since they all share the same ScriptMaker Engine.

However, what I might not agree with or understand is this: When you say: if the db's are being shared by multiple clients, another client could initiate a script during the pause.. Does this also apply to a DB hosted by FileMaker server, and then accessed by multiple FileMaker clients? Wouldn't each FileMaker client have it's own ScriptMaker Engine, and therefore in a weird FileMaker way have a "Multi-Threaded" ScriptMaker environment operating on the same databases that are hosted by FM Server? (RAIC Comes to mind). Each copy of FileMaker is operating in it's own Environment, and ScriptMaker is operating within it's own environment on that single computer. So technically, it OK if 2 or more different computers run the exact same script, at the exact same time if they are operating on FM Server hosted data. (yes, record locking and some other factors are issues, but not ScriptMaker in this case).

Is this presumably correct?

Share this post


Link to post
Share on other sites

You have posed some good questions. I am hopeful that some others will respond. I do not have experience with FM Server.

If FM Server serves the same database to multiple clients and if "record locking" occurs when a db is served from FM Server, then I would assume that if FM Server is hosting the db, when a client (also running FMP) accesses that db, and calls a script event therein, the script is being run in relation to that db and the ScriptMaker engine on the server would be involved in handling the script event. Therefore conflict at the single-thread engine of the server.

But we all know about "assume". And so I await someone else to respond.

Share this post


Link to post
Share on other sites

Almost...FM Server is multi-threaded for scripts. The only conflict in multiple users running a script would be if record locking protection take effect when two users try to change the same record. If, however, the host is a normal client version of FM, a pause in a script hangs all users.

-bd

Share this post


Link to post
Share on other sites

Does FileMaker Server have a ScriptMaker Engine?? Or, is it just serving the data out to the clients that then process that data through it's own ScriptMaker Engine? I agree that FileMaker Server can simultaneously send & receive multiple requests for data, but is the server processing scripts too? I've always assumed that the scripts run locally on the client based on the data that the server sends.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.