Jump to content
Sign in to follow this  
Juvigy

Parameter issue

Recommended Posts

Juvigy

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?

Share this post


Link to post
Share on other sites
Yashied

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().

Share this post


Link to post
Share on other sites
Juvigy

Maybe ProcessExists(), ProcessWait() and ProcessWaitClose().

I dont get it. Please clarify. These are process management functions.

Share this post


Link to post
Share on other sites
Yashied

Share this post


Link to post
Share on other sites
Juvigy

I still dont get it. Maybe you didnt get my issue?I know what these 3 functions are used for but dont get how they would help me .

Share this post


Link to post
Share on other sites
KaFu

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.

Share this post


Link to post
Share on other sites
bo8ster

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]

Share this post


Link to post
Share on other sites
Juvigy

"directly as an attachment to the .exe using ADS" Please explain.

Share this post


Link to post
Share on other sites
KaFu
KaFu

Note that the latest version of SMF has an option to search for ADS (and displaying the respective file-names).

Edited by KaFu

Share this post


Link to post
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
Sign in to follow this  

×