Page 1 of 1

how make dot every 4 character number

Posted: Oct 16th, ’21, 06:06
by stevenwi87
have script how make every 4 character number have dot

example
081234567890 to 0812.3456.7890

Re: how make dot every 4 character number

Posted: Oct 16th, ’21, 21:26
by Tom
Create a shortcut (Type=Command) - this script will replace the selected string with a formatted one.

Code: Select all

send, ^c
sleep 200
string:=""
loop, parse, clipboard
	string:=string A_LoopField (((Mod(A_Index, 4) = 0) && (A_Index != StrLen(clipboard))) ? "." : "" )
sendinput % string

Re: how make dot every 4 character number

Posted: Oct 17th, ’21, 02:26
by stevenwi87
thank you for help tom your awesome