Jump to content

Parameter issue


Recommended Posts

Is it possible is i have on exe file and run it , at some point the software to update one of its parameters , lets say a counter. And after closing the program and starting it again to remember the updated value. For example a counter that counts how many time the software was run. And it shouldnt be a workaround like writing to the registry or in a file on the hard drive.Maybe reserving a RAM memory space for one variable or updating the exe file source code somehow?

Link to comment
Share on other sites

Is it possible is i have on exe file and run it , at some point the software to update one of its parameters , lets say a counter. And after closing the program and starting it again to remember the updated value. For example a counter that counts how many time the software was run. And it shouldnt be a workaround like writing to the registry or in a file on the hard drive.Maybe reserving a RAM memory space for one variable or updating the exe file source code somehow?

Maybe ProcessExists(), ProcessWait() and ProcessWaitClose().
Link to comment
Share on other sites

Link to comment
Share on other sites

The count has to be stored somewhere. Memory is released after program exit (and I don't know any workarounds to preserve this). Write it to Registry, INI-File or directly as an attachment to the .exe using ADS.

Link to comment
Share on other sites

Is it possible is i have on exe file and run it , at some point the software to update one of its parameters , lets say a counter. And after closing the program and starting it again to remember the updated value. For example a counter that counts how many time the software was run. And it shouldnt be a workaround like writing to the registry or in a file on the hard drive.Maybe reserving a RAM memory space for one variable or updating the exe file source code somehow?

KaFu is correct. If you really want, you can reserve Memory in real mode (Virtual Memory will be lost as soon as the program ends) but you need the program to remember where it is. The exe only contains compiled code so that is no use. You either have to have another program running at the same time, or it has to be within another program - none of which are simple.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Link to comment
Share on other sites

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...