【天堂论坛】玩机到天堂 买机找海洋西门子 6688……黑白经典.MP3机王 → 如何在电脑上把smi和smo短信一次性转化成txt文档!
查看完整版本:如何在电脑上把smi和smo短信一次性转化成txt文档!
2006/2/16 14:51:53

由于小8的手机里面的存的短信有限,最多40条。因此很多时候不得不把短信存到MMC卡里,但是想在电脑里面读SMO和SMI短信有点不便,所以希望可以把它们全部转化成txt文档,从而把相同人发的短信进行分类,这样以后阅读起来就十分方便了。

所以不知道有没有一个软件可以直接读取smi和smo格式的短信,并可以把同时把所有短信一次转为txt文档的!

如果有的话请大家帮我推荐一下,在下十分感谢,如果没有的话希望有为人士可以开发一个,真的很实用的。

[此帖子已被 hjlali 在 2006-2-16 14:54:01 编辑过]

2006/2/16 15:51:41
看看这个软件怎么样? 相关附件
2006/2/18 0:38:55

其实smo和smo主要格式是用unicode储存的,本人就会点foxpro编程,早期写了一个很简单的,现把源文件登出,有兴趣的人可以用其他语言改写扩充一下:

转发出短信,在smo目录下运行的话会生成unicode的同名文本文件:

et talk off
set cent on
set safe off
set date ansi
close all
clear all
=adir(smo,'*.smo')
countsmo=alen(smo)/5
for j=1 to countsmo
  a=fopen(smo(j,1))
  if file(smo(j,1)+'.txt')
     delete file smo(j,1)+'.txt'
  endif
  b=fcreat(smo(j,1)+'.txt')
  if b>0
       =fwrite(b,chr(255)+chr(254))     &&写unicode文件头
  endif
  if a>0 and b>0
     p=6
     =fseek(a,p,0)
     l1=asc(fread(a,1))
     p=p+l1+3
     =fseek(a,p,0)
     l2=int((asc(fread(a,1))+1)/2)
     p=p+2
     if l2!=0
      for i=p to p+l2-1                         &&get phonenember
        =fseek(a,i,0)
        c1=fread(a,1)
        if i=p and asc(c1)=145
             =fwrite(b,'+')
           =fwrite(b,chr(0))
        else
            =fwrite(b,allt(str(mod(asc(c1),16))))
            =fwrite(b,chr(0))
            if asc(c1)/16<10
              =fwrite(b,allt(str(int(asc(c1)/16))))
              =fwrite(b,chr(0))
            endif
          endif
      endfor     
      =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
     endif
     p=p+l2+3
      =fseek(a,p,0)
      cl=asc(fread(a,1))
      for i=p+1 to p+cl step 2                         &&get content
        =fseek(a,i,0)
        c2=fread(a,1)
        =fseek(a,i+1,0)
        c1=fread(a,1)
        =fwrite(b,c1)
        =fwrite(b,c2)
      endfor
      =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
      =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
  endif
 =fclose(a)
 =fclose(b)
endfor
 =fclose(a)
 =fclose(b)
set talk on
set safe on

 

转接受短信,在smi文件目录下运行的话会生成unicode的同名文本文件:

set talk off
set cent on
set safe off
set date ansi
close all
clear all
=adir(smi,'*.smi')
countsmi=alen(smi)/5
for j=1 to countsmi
  a=fopen(smi(j,1))
  if file(smi(j,1)+'.txt')
     delete file smi(j,1)+'.txt'
  endif
  b=fcreat(smi(j,1)+'.txt')
  if b>0
       =fwrite(b,chr(255)+chr(254))
  endif
  p=0
  if a>0 and b>0
     p=6
     =fseek(a,p,0)
     l1=asc(fread(a,1))
     p=p+l1+2
     =fseek(a,p,0)
     l2=int((asc(fread(a,1))+1)/2)
     pt=p+l2+4                          &&get time
    for i=pt to pt+4
        =fseek(a,i,0)
        c1=fread(a,1)
        =fwrite(b,allt(str(mod(asc(c1),16))))
        =fwrite(b,chr(0))
        if asc(c1)/16<10
          =fwrite(b,allt(str(int(asc(c1)/16))))
          =fwrite(b,chr(0))
        endif
        do case
          case i-pt<2
            =fwrite(b,'.')
            =fwrite(b,chr(0))
          case i-pt=2
            =fwrite(b,' ')
            =fwrite(b,chr(0))
          case i-pt=3
            =fwrite(b,':')
            =fwrite(b,chr(0))
         endcase
      endfor
      =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
      p=p+1
      for i=p to p+l2                         &&get phonenember
        =fseek(a,i,0)
        c1=fread(a,1)
        if i=p and asc(c1)=145
           =fwrite(b,'+')
           =fwrite(b,chr(0))
        else
          if i=p
          else
            =fwrite(b,allt(str(mod(asc(c1),16))))
            =fwrite(b,chr(0))
            if asc(c1)/16<10
              =fwrite(b,allt(str(int(asc(c1)/16))))
              =fwrite(b,chr(0))
            endif
          endif
        endif
      endfor
      =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
      p=p+l2+10
      =fseek(a,p,0)
      cl=asc(fread(a,1))
      for i=p+1 to p+cl step 2                         &&get content
        =fseek(a,i,0)
        c2=fread(a,1)
        =fseek(a,i+1,0)
        c1=fread(a,1)
        =fwrite(b,c1)
        =fwrite(b,c2)
    endfor
    =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
    =fwrit(b,chr(13)+chr(0)+chr(10)+chr(0))
    =fclose(a)
  endif
endfor
  =fclose(b)
  =fclose(a)
set talk on
set safe on

2006/2/18 10:57:51
好,顶
2006/2/18 16:57:04
好呀
2006/2/18 22:49:43
引用
原文由 潜水员 发表于 2006-2-16 15:51:41 :
看看这个软件怎么样? 相关附件
这个软件也很不错,可惜不能在smi、smo和txt文件之间实现批量转换!
Powered by BBSXP 2007 ACCESS © 1998-2024
Processed in 0.02 second(s)