13 Replies Latest reply on Jun 21, 2012 9:35 AM by pedantic

    Changing Preferences in a script

    pedantic

      Hello everyone.

       

      Management has decreed that the product we send out should make sure that the "Allow drag and drop text selection" under Preferences->General is unchecked. There's this issue of possible errors costing the company money, etc. Anyway, how can one get the Allow drag and drop text selection" preference turned off using a Filemaker script? I see no means of accessingn the preferences through a script.

       

      R,

      John

        • 1. Re: Changing Preferences in a script
          taylorsharpe

          There is no script that controls preferences, nor is there a way to determine the preference state via a script step.  You would have to control this at the time of installation. There are various enterprise management programs for pushing through software across a network that you could use and probably control the preference by that process.  But you still could not tell if the user went back and changed it. 

           

          Maybe you might want to look at things from a different angle.  There are a couple of good plugins that allow you to have a full audit trail of all changes, deletes, creates, made in a database down to the field level.  One is CNS Audit (http://www.cnsplug-ins.com/Plug-ins/CNS_audit) and another is fmDataGuard (http://www.syncdek.com/fmdataguard/faq.html). 

           

          And you might want to FileMaker and the "Help" pull down at the top menu bar and then select "Provide FileMaker Feedback" and give FileMaker a suggestion to have some Get functions that can determine Preference settings and maybe change them. 

          • 2. Re: Changing Preferences in a script
            pedantic

            Thanks Mr. Sharpe for your candid and speedy reply.  Alas, the users of this product are not employees, but customers so the suggestions you make are probably not much doable.  Which likely means we are out of luck, and that does not bode well for the project.However, that's my problem, not yours.

             

            I will, however, take your suggestion to provide FM feedback.  IMHO, the inability to modify preferences in a script is a serious omission. 

             

            Take care.

             

            John

            • 3. Re: Changing Preferences in a script
              nickchapin

              John:

               

              Perhaps you can speak to Management and discuss how changing a user's prefs on their own system may not be the best route. If I purchased a set of Photoshop template files and one of those files changed my Photoshop prefs I don't think I would be too happy with the template. A similar experience could result in your case if the user later started developing or purchasing solutions that required drag and drop. It would be chaos to have multiple solutions open and each one messin' with the application prefs.

               

              Rather, you may want to control the issue of data within your solution. Perhaps using script triggers and data validation you can check the fields in question to ensure you're not getting the dreaded data. This keeps the solution local (as opposed to going outside of your solution to the application level), and you can go forward with your project.

               

              Nick

              • 4. Re: Changing Preferences in a script
                monkeybreadsoftware

                It may be possible to query the preferences on Mac using standard APIs from a plugin. If you are interested, email me and I can look into adding a function to query your value.

                So you could warn the user.

                 

                Greetings

                Christian

                • 5. Re: Changing Preferences in a script
                  pedantic

                  You make some very good points, Nick.  I think that their response would be (and you did not know this so I apologize for the lack of information) "this is our run-time and we can do what we want with it."  We don't send out a script, we send out a runtime so that our customers don't need to procure FM. 

                   

                  Still, regardless, I think that management is going to have to eat this one.  And your idea about script triggers is a good one.  My own lack of experience in FM kept me from thinking about that option. 

                   

                  Thanks for your input and take care.

                   

                  John

                  • 6. Re: Changing Preferences in a script
                    pedantic

                    Thanks, Christian, but our timetable is a bit constrained.  I think that whatever we can do with scripting will be the proverbial "it."  I appreciate your input, however.  Being an InDesign plugin builder, I know how powerful such approaches can be.

                     

                    Take care and good fortune.

                     

                    John

                    • 7. Re: Changing Preferences in a script
                      monkeybreadsoftware

                      Well, Just checked it. I can add function in a few minutes. Not a big problem. Well, if you don't need it, that's fine. :-)

                       

                      have a nice weekend!

                       

                      Greetings

                      Christian

                      • 8. Re: Changing Preferences in a script
                        pedantic

                        Christian, let's take this offline.  Can you please email me at John period Darnell at Walsworth period com?

                        • 9. Re: Changing Preferences in a script
                          fmpros

                          Not sure if it's possible within your design specs but have you considered using customs menus and

                          removing the preferences menu item altogether?

                           

                          William O'Keefe

                          Frenel Solutions

                          • 10. Re: Changing Preferences in a script
                            pedantic

                            Hello Mr. OKeefe:

                             

                              

                            As far as I can tell, removing the Preferences menu is not possible.  Please remember that I am working with runtimes here.  The runtime includes one single menu dropdown that cannot be removed--the dropdown called by the name of the runtime. It cannot be removed nor can it be modified--I've tried.  All the other menu dropdowns can be manipulated and I can even create brand new menu dropdowns, but the Runtime menu dropdown, where the Preferences option is kept, may not be removed.

                             

                               There are several possible solutions to the above, including making a preference file with the correct values and copying that file to the Library/Preferences folder upon installation.  That works for the Mac side of the house.  Unfortunately, on the Windows side, these values are stored in the Registry, and though modifying the Registry is doable, I would have to write a separate executable to handle the chore.  At least, I don't see anything in the Filemaker scripting language that allows me to directly manipulate Registry values.  Besides, playing with the Registry is not on my list of favorite things to do. (grin)

                             

                               Thanks for your input.  I appreciate you taking the time to think about my problem. 

                             

                            R,

                            John

                            • 11. Re: Changing Preferences in a script
                              fmpros

                              Hi John,

                               

                              I haven't played with runtimes for awhile but will be upgrading an old one soon and will be addressing these issues.

                              I just opened my previous runtime (on Windows XP SP3) created with FMPA 11 and a custom menu in which the

                              menu system is completely my design, i.e., no preferences menu.  So I think it is possible but excuse me if

                              I am wrong; I have not played with it for awhile as mentioned.

                               

                              Of course the downside to this is that you lose other options contained within the Preferences menu.

                               

                              Wiliam O'Keefe

                              Frenel Solutions

                              • 12. Re: Changing Preferences in a script
                                monkeybreadsoftware

                                I bet it's not impossible to remove the preferences entry from menu. Or at least install talk to the OS to route the event through plugin and catch before filemaker.

                                 

                                Greetings

                                Christian

                                • 13. Re: Changing Preferences in a script
                                  pedantic

                                  On the Mac, the "Filemaker Pro" menu can be removed but if I attempt to modify its contents, I am given only a couple of lines to manipulate and they do not include Preferences.  On the Windows side, the Preferences option is placed under the Edit dropdown, and I was able to remove the Edit menu. I was also able to remove the Preferences option from the Edit menu.