Jump to content

Recommended Posts

Posted

Hi guys I understand that our variables are temporary they are stored in memory while we execute our program but I would like to know if there is a way to make our generated variable to be stored constantly. For example to be able to close our program and when we open it again remember the value we put in the variable.

An example would be. Generate a random number after closing our program open it again. and to be able to show the value of the number that we want to store.

#include <MsgBoxConstants.au3>



Example()

Func Example()

        $number1= Random(1, 6, 1) ;here we generate our first value
        Global Const $number = $number1 ;We save the value to remember it

        MsgBox($MB_SYSTEMMODAL, "", "The number generated is : " & $number1)
        MsgBox($MB_SYSTEMMODAL, "", "The number saved is : " & $number) ; This is the number I want it to save and remember after I close the program and reopen it.

EndFunc   ;==>Example

 I hope you understand what I want to do, could you tell me if it is possible to do this? Thanks

  • Developers
Posted
45 minutes ago, Dsmoeg999 said:

Do you provide more than just comments ? 😉

This basically sums it up: You aren't clearly putting in any effort for anything before posting. 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
×
×
  • Create New...