string mmy_txt
string mm[]
integer i
long ascnum
integer j
long cout
mmy_txt=rte_12.text(机器码)
for i=1 to len(mmy_txt)
rte_12.selecttext(i,1)
mm[i]=string(rte_12.selecttext())
if match(mm[i],"[^0-9]")=false then
ascnum=ascnum+long(mm[i])*6
end if
ascnum=ascnum+asc(mm[i])*2
if i>4 then
ascnum=ascnum+11
end if
next
cout=len(mmy_txt)
for j=1 to len(mmy_txt)
cout=cout+cout*asc(mm[j])*2
next
cout=cout+ascnum*2
mmy_txt=right(string(cout*2),len(string(cout))-2)+left(right(string(cout/2),len(string(cout))-2),len(string(cout))-4)
return mmy_txt
string mmy_txt
string mm[]
integer i
long ascnum
integer j
long cout
mmy_txt=rte_12.text(机器码)这里改为你的输入对话框
for i=1 to len(mmy_txt)
rte_12.selecttext(i,1)
mm[i]=string(rte_12.selecttext())
if match(mm[i],"[^0-9]")=false then
ascnum=ascnum+long(mm[i])*6
end if
ascnum=ascnum+asc(mm[i])*2
if i>4 then
ascnum=ascnum+11
end if
next
cout=len(mmy_txt)
for j=1 to len(mmy_txt)
cout=cout+cout*asc(mm[j])*2
next
cout=cout+ascnum*2
mmy_txt=right(string(cout*2),len(string(cout))-2)+left(right(string(cout/2),len(string(cout))-2),len(string(cout))-4)
return mmy_txt 这里改为输出对话框的值
事件过程放到一个按钮里 就是注册机了
rte_12.selecttext()这个自定义的函数要放进去
别的就应该可以了pb不懂不过这样应该就可以了