; Gui, +AlwaysOnTop
Gui, Add, Text,x10 y10,% "输入要转换的字符串"
Gui, Add, Edit,w500 x10 y+6  vcn
Gui, Add, Text,x10 y+10,% "字符串 -> Unicode"
Gui, Add, Edit,w500 x10 y+6 vunicode
Gui, Add, Text,x10 y+10,% "Unicode -> 内存"
Gui, Add, Edit,w500 x10 y+6 vmemory
Gui, Add, Button,w502 h28 x9 y+10 gbutton +Default,% "转换"
Gui, show, w520 h196
return

button:
  Gui,+OwnDialogs
  Gui,Submit,NoHide
  myunicode := ""
  loop, Parse, cn
  {
    myunicode .= "\u" Format("{:x}", Asc(A_LoopField))
  }
  myunicode := Trim(myunicode," ")
  mymemory := ""
  mymemoryarr := StrSplit(Trim(StrReplace(myunicode,"\u"," ",ReplaceNumb)," ")," ")
  for index, ele in mymemoryarr{
    if (RegExMatch(ele,"(\w{2})(\w{2})",regvalue)){
      mymemory .= regvalue2 " " regvalue1 " "
    }else{
      mymemory .= ele " "
    }
  }
  mymemory := Trim(mymemory," ")
  GuiControl,,unicode,% myunicode
  GuiControl,,memory,% mymemory
return

GuiClose:
  ExitApp
return

 

声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。