Jump to content
Macro Express Forums

Saving Control Variables


Recommended Posts

I'm trying to learn to use windows control variables. I created a very simple instance of using a control variable to click a button. Eureka!! It worked! Now I want to be able to save the information from session to session (where m/e is closed and no longer running or memory resident in any way). Save/Restore variables didn't work.


Thanks for any advice or suggestions. :rolleyes:


Scott Betz

Link to comment
Share on other sites

When you use the Get Control command the Window Control information is stored inside the command. When you use the Capture Control command the Window Control information is only available as that macro runs.


Some applications change the Window Control information for their components each time the program runs. For these applications you must use the Capture Control command. Saving and restoring the Window Control information would not help because the Window Control information changes.


For those applications where the Window Control information does not change you should use the Get Control command. Since the Window Control information is saved in the macro as part of the command, there is no need to save and restore these variables.


I should note that for some programs the Window Control information varies if the application is running on Windows XP versus Windows 98. The way I deal with this is to create separate Capture Control and If OS Version commands for each version of Windows.

Link to comment
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.

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.

  • Create New...