beginner here...
why "b" var does not sum with "a" variable ?
in this case ,the result should be 255 instead 250
the function must remain as it is now
Thanks
Code: Select all
#SingleInstance, Force
Global a, b, x
a := 5
b := 100 + a
x := 150
sum(x) {
R1 := x + b
return R1
}
Gui, +AlwaysOnTop
Gui, Add, Text,w90 h30 , a
Gui, Add, Edit,w110 h30 va, 5
Gui, Add, Text, w90 h30 , b
Gui, Add, Edit, w110 h30 vb, 100
Gui, Add, Edit, w110 h50 vrez
Gui, Add, Button,w130 h20 cal, cal
Gui, Show
return
ButtonCal:
Gui, Submit, NoHide
rez:= % sum(x)
GuiControl,, rez, %rez%
Return
GuiClose:
ExitApp