acantor Posted December 29, 2019 Report Share Posted December 29, 2019 I've never used Macro Express to interface with the Windows Registry. But now I have an idea for a script that would "remember" a setting from the previous run time. Are there certain areas of the Registry I should avoid reading and writing values to? Are some areas "safer" than others? For example, could I add a key called "My Values" here without causing problems? HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 6\My Values Quote Link to comment Share on other sites More sharing options...
Cory Posted December 29, 2019 Report Share Posted December 29, 2019 This is what I do. Quote Link to comment Share on other sites More sharing options...
terrypin Posted December 29, 2019 Report Share Posted December 29, 2019 Yes, me too. I chose a similar location, with separate keys for Integer and Text, and made it a 'Favorite' for fast access. 1 Quote Link to comment Share on other sites More sharing options...
acantor Posted December 29, 2019 Author Report Share Posted December 29, 2019 So you suggest adding a key (with several sub-keys) in HKEY_CURRENT_USER\... Any advantages or drawbacks of burying my custom settings deeper in the hierarchy? Quote Link to comment Share on other sites More sharing options...
terrypin Posted December 29, 2019 Report Share Posted December 29, 2019 Hi Alan, I just found it easier to keep track by splitting into those two sub-keys. I've never tried other locations which instinctively seems risky! Quote Link to comment Share on other sites More sharing options...
acantor Posted December 30, 2019 Author Report Share Posted December 30, 2019 Hi Terry, I created a new key in the registry and the macro has been saving the retrieving the data as I hoped it would. But now I realize I could also save the data in a file, which would be less risky. Variable Modify String: Save %SavedValue% to "C:\Users\Me\Documents\Test.txt" Variable Set String set %SavedValue% to the contents of C:\Users\Me\Documents\Test.txt Quote Link to comment Share on other sites More sharing options...
Samrae Posted December 30, 2019 Report Share Posted December 30, 2019 There is nothing inherently risky about saving data in the registry as long as you know and remember which registry area (key) you use. Using the registry may be somewhat faster than reading from a file. However, depending on what your macro is doing, you may not notice the difference. There is a potential side effect of using values in the area of the registry (registry key) that Macro Express uses such as this: HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express 6\My Values When you export the Macro Express settings (Tools, Export Program Configuration) and then import them either later (Tools, Import Program Configuration) Macro Express will display a warning about the registry keys and values that it does not recognize. It is pretty safe to use other areas of the registry such as HKEY_CURRENT_USER\Terry Work Area You could also use something like this: HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express Data 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.