Jump to content
Server Maintenance This Week. ×

Stop Window Closures


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

Recommended Posts

I want to break some fingers. I want to be sure they have filled out a record right before they are allowed to leave it. I have script to check their entries. But instead of using my button to Close, they x on the dumb window and leave things undone. How can I stop them? Does 7 have ability to let me keep control and not let them close it until I let them? I didn't notice it before because I never used windows like I am in 7. Not sure how to control our staff.

Pete

Link to comment
Share on other sites

jfmcel is right. The short answer to your question is "No". You need a plug in. I have 100+ users that get click happy with the little X in the corner as well.

You can do a more complicated work around instead of a plug in. Simply write a script that takes the user into the layout for data entry, then send the script into a loop with a pause, and only exit loop if... whatever the criteria is you set forth.

A looping script will lock up the record and not let them "X" out of it. There are several more tricks and stipulations to this technique that's been explained on the boards a couple of times. I've used this in a couple of situations and it works great... and added bonus is that it takes away a lot of the options in the menus when the script is looping. I thought there was an article about this on the ISO magazine's website, but I can't be certain.

Link to comment
Share on other sites

Thank you both for helping. Yeah. I've used various things. Was considering Window Utility until 7 came out. I hoped 7 had some additional ways to help me out. I read through all Get Window etc but didn't see anything.

Too bad we can't attach a script to a Close Window like we can in Edit where you can make a script run on closing the file. That would be great. grin.gif

Thanks any way guys.

Pete

Link to comment
Share on other sites

I have been able to disable the Windows Close button thru the use of a small WinBatch EXE- Filemaker can't be closed down this way after the EXE is run. However, I haven't been able to prevent users from cloing individual files. Since I use Dacons Menu Control to create runtimes, and the runtime itself doesn't allow the user to close individual files...the 3 Window buttons for individual files are removed, what I have works just fine in a runtime. While Secure FM will remove the buttons, it is incompatible with MenuControl. If anybody would like the exe, let me know.

Link to comment
Share on other sites

Hi Roger: It doesn't permanently change the button. You would need to call it at the beginning of the runtime everytime. All it does is zero a flag in User32.DLL. I could have also included a method to turn it off from within FM but I didn't see the need.

I'll email you the EXE and a small FP5 test file.

Steve

Link to comment
Share on other sites

The problem is that I haven't been able to prevent a user from closing an individual file. Since the runtime doesn't appear as having individual files disabling the close button on the application works. The only other way that I can think of is trying to hack into FM, which is both prohibited and beyond me.

Steve

Link to comment
Share on other sites

Closing an individual file is okay, though, since an on close script will be performed. Clicking X on the application is what causes problems and trashes files quickly. Disabling that is what I would consider most important.

Link to comment
Share on other sites

Closing an individual file is not OK. What happens if the user has been entering data but the data has not yet been validated and saved (assumming he's entering in globals)? Sometimes he's entering data into a record. You might wind up with a partially complete record and un-validated. You can't run a script on exit, cause you don't know what the user was doing when he hit the close button.

Steve

Link to comment
Share on other sites

I found an answer!!! I think! For me at least! I've been considering kiosk, using Menu Control, WindowUtility etc. Some don't go with others (they don't like each other) and I want to activate scripts on exiting etc.

Check this out! I thought i'd have to buy three plugsins to do all this...

You can rename menu items or remove them all. YOu can stop close/exit from windows, execute script when active window changes, activate scripts from calcs or tabbing from field - everthing I've been struggling with for six months.

I thought Secure FM was just for passwords. But it isn't. And it also has Menu Control built in.

Secure FM with Menu Control

Oh very excited. I'm going to order it but I'll try to wait a few days in case anyone knows something I should consider first. And I'm not clear that, if I order it now, I can start using it in my new 7 design. Does anyone understand that part? Very cool though. cool.gif

Pete

Link to comment
Share on other sites

My apologies, John. You said, "SecureFM plug-in will allow you to prevent closing (or quiting) the file via key board commands or via the menus."

I didn't see that you meant specifically windows and windows was what I was focusing on. Sorry. crazy.gif

But you are certainly correct! I'm glad you mentioned it again. I clicked some other link for some other product on some other forum and bang! I was there staring at it! And the price is great too! Didn't know SecureFM did WINDOWS!!! grin.gif

Thanks very much for helping me guys. FM rocks. wink.gif

Pete

Link to comment
Share on other sites

Simple, you test if they are on such a layout in your on close script.

If [PatternCount(Status(CurrentLayoutName), "global")]

Set Field [prefs::incompleteRec, prefs::incompleteRec & ID & "

Link to comment
Share on other sites

  • 1 month later...

Hey Steve, any chance you could add another script to enable the dll flag? It would be nice to be able to activate this on close, so that a user doesn't have to learn Ctrl-Q or Alt-F4, which I'd rather they wouldn't anyway. wink.gif

Link to comment
Share on other sites

  • 1 month later...

I'm relatively new to this forum and a little late to this particular discussion but for my 2 cents...

I've been using SecureFM for more than 2 years now and find that it is very stable and is an indispensable tool to keep users from doing real damage in the countless ways that they seem to find so effortlessly. I use it in a networked environment with both Macs and PC's with all solution files hosted on an Xserve running Filemaker Server 5.5 - it's really worth the price you have to pay for a plugin solution. It's a bit trickier programming for novice or novice/intermediate developers but gives you a level of control and security just not available any other way.

Link to comment
Share on other sites

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