basic calculation Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Alcrkai
Posts: 47
Joined: 16 Mar 2021, 10:51

basic calculation

Post by Alcrkai » 15 Nov 2021, 08:14

Good morning, can anyone tell me why it doesn't work like this?

Code: Select all

InputBox, m, mes
InputBox, s, valor
loop %m%
{
	y=%y%+%s%
	MsgBox % y
	s=%y%*(100/100/100*3)
	MsgBox % s
	
	
}
MsgBox %y%

User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: basic calculation  Topic is solved

Post by mikeyww » 15 Nov 2021, 08:18

A demonstration is below.

Code: Select all

x   = 1
y   = 2
r1  = %x%+%y% ; A literal string
r2 := x + y   ; A result of evaluation
MsgBox, 64, Results, r1 = %r1%`nr2 = %r2%
Explained: Expressions:= operator

Alcrkai
Posts: 47
Joined: 16 Mar 2021, 10:51

Re: basic calculation

Post by Alcrkai » 15 Nov 2021, 08:22

I understand now how it works, thanks for the help.

Post Reply

Return to “Ask for Help (v1)”