Autohotkey 如何在AHK中将字符串转换为整数

Autohotkey 如何在AHK中将字符串转换为整数,autohotkey,Autohotkey,我有下面的代码,我想得到一个字符串,比如“0,0”转换为整数和两个变量之和,把它放在一个新变量上。 我在互联网上寻找解决方案,但没有成功 代码: MouseMove, 238,282 MouseClickDrag, Left, 238,282, 238,282 Sleep, 200 Send, {CTRLDOWN}c{CTRLUP} CLIPWAIT, 0.5 SaldoContabil = %ClipBoard% ; here is gettin

我有下面的代码,我想得到一个字符串,比如“0,0”转换为整数和两个变量之和,把它放在一个新变量上。 我在互联网上寻找解决方案,但没有成功

代码:

    MouseMove, 238,282
    MouseClickDrag, Left, 238,282, 238,282
    Sleep, 200
    Send, {CTRLDOWN}c{CTRLUP}
    CLIPWAIT, 0.5
    SaldoContabil = %ClipBoard% ; here is getting 0,0
    Sleep, 400

    MouseMove, 602,283
    MouseClickDrag, Left, 602,283, 602,283
    Sleep, 500
    Send, {CTRLDOWN}c{CTRLUP}
    CLIPWAIT, 0.5
    ArredAcumulado = %ClipBoard% ; here is getting 0,0
    Sleep, 400


    baixa = %ArredAcumulado% - %SaldoContabil%

在最终计算之前添加以下行。
只需将
替换为
,即可从
0,0
获得
0.0
,无需进一步转换

SaldoContabil := StrReplace(SaldoContabil,",",".")
ArredAcumulado := StrReplace(ArredAcumulado ,",",".")

它终于起作用了,我试了两天,非常感谢aswer,它对我帮助很大。