jvanegmond Posted August 2, 2006 Posted August 2, 2006 (edited) This probably exists. I thought of this last night when i went to bed. Edit: I build this because i've had need for this in the past, but always solved it in a fixed way. The generic way is the better one imo. ; ---------------------------------------------------------------------------- ; AutoIt Version: 3.1.0 ; Author: Jos van Egmond <> ; ; Script Function: ; Example, with function, of Change. ; Use this as If Change("hello") Then MsgBox(0,"Alert", "$hello has changed"); ; ---------------------------------------------------------------------------- $i = 0 While 1 $i += random(0,1,1) If Change("i") Then;variable name in string without $ MsgBox(0, "Alert", "$i has changed $i = "&$i) Else MsgBox(0, "Alert", "$i has NOT! changed $i = "&$i) EndIf WEnd Func Change($var) If IsDeclared($var&"_variable_copy") Then If Eval($var) == Eval($var&"_variable_copy") Then Assign($var&"_variable_copy",Eval($var),0) Return 0 Else Assign($var&"_variable_copy",Eval($var),0) Return 1 EndIf Else Assign($var&"_variable_copy",Eval($var),2) Return 0 EndIf EndFunc Edited March 21, 2018 by jvanegmond github.com/jvanegmond
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now