Search the Community
Showing results for tags 'store the value'.
-
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
-
HotKeySet("^{SPACE}", "get_color") $colorCodeHere = ;<---------------- func get_color() Global $point = MouseGetPos() Global $color = PixelGetColor($point[0], $point[1]) MsgBox(0, "debug", "result: " & $color) EndFunc While 1 Sleep(100) WEnd Hello guys my problem is, how can i store the value that i get in that PixelGetColor($point[0], $point[0]) i know that when i msgbox the color i will show the = of $color but i wanted it to be the value like $colorCodeHere = 13456254. but not hardcoding the value. or how could i say if $color is = to $color then do this and if $color is not equal to $color then do that.
- 1 reply
-
- pixelgetcolor
- value
-
(and 1 more)
Tagged with: