Code: Select all
x1 := v1 - v2
; v1 is 74
;v2 is 80
MsgBox, % x1
;the Message box is empty.
Code: Select all
x1 := v1 - v2
; v1 is 74
;v2 is 80
MsgBox, % x1
Code: Select all
v1 := 74
v2 := 80
x1 := v1 - v2
MsgBox, % x1
Code: Select all
#Include uia.ahk
$u:=new IUIAutomation
$e:=new IUIAutomationElement
$c:=new IUIAutomationCondition
$r:=new IUIAutomationCacheRequest
$t:=new IUIAutomationTreeWalker
^t::
Loop 1
{
Element1 := $u.ElementFromPoint(586|255<<32)
v1 := $e.(Element1).CurrentName() . "`n" ;v1 is a number
Element2 := $u.ElementFromPoint(599|255<<32)
v2 := $e.(Element2).CurrentName() . "`n" ;v2 is a number
x1 := v1 - v2
MsgBox, %x1%
}
Return
Code: Select all
v1 := 74
v2 := 80
x1 := v1 - v2
msgbox % x1
v1 .= "`n"
v2 .= "`n"
msgbox % v1 v2 "third line"
Code: Select all
v1 := " 74 "
v2 := " 80 "
; strip white spaces
v1 := Trim(v1, " `t`r`n")
v2 := Trim(v2, " `t`r`n")
x1 := v1-v2
MsgBox % x1
Code: Select all
v1 := RegExReplace(v1, "\D")
v2 := RegExReplace(v2, "\D")