$a1=InputBox(0,"","")
Dim $text
If StringIsDigit (StringReplace ($a1,".",""))=1 Then
For $i=1 To StringLen ($a1)
If StringMid ($a1,$i,1)= "." Then $k=StringMid ($a1,$i,StringLen ($a1)-$i+1)
Next
$a1=StringReplace ($a1,$k,"")
If StringIsDigit ($a1)=1Then
For $i =3 To StringLen ($a1) Step 3
If $i-StringLen ($a1)=0 Then
$text=StringLeft($a1,3)&$text
ExitLoop
EndIf
$text=","&StringMid ($a1,StringLen ($a1)-$i+1,3)&","&$text
Next
If StringRight ( $text, 1 )="," Then $text=StringTrimRight ( $text, 1 )
MsgBox(0,"",StringReplace (StringLeft ($a1,Mod ( StringLen ($a1) , 3 ))&$text,",,",",")&$k)
EndIf
EndIf http://www.autoitx.com/forum.php?mod=viewthread&tid=14377
需要的可以测试下
页:
1
[2]