Text in a function as a variable
Posted: 05 May 2024, 05:58
Hello, it's a shame, but I keep missing the basics. How to insert a variable as text, but at the same time make it work with variables?
In this case, equations1 and equations2 are calculated only once and after the variable (equations1 and equations2) there is a result which does not change depending on the change of x and y. Thank you
In this case, equations1 and equations2 are calculated only once and after the variable (equations1 and equations2) there is a result which does not change depending on the change of x and y. Thank you
Code: Select all
#Requires AutoHotkey v2.0
x := 0
y := 0
result1 := 2
result2 := 2.5
equations1 := x + y
equations2 := 0.5*x+2*y
loop{
if (equations1 = result1)
MsgBox("Yes")
else
MsgBox("No")
if (equations2 = result2)
MsgBox("Yes")
else
MsgBox("No")
x++
y++
}