中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-10 16:42
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » ALT+小键盘数字 查询器 查看 2,911 回复 22
16 发表于 2008-04-22 20:04 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
MsgBox Ascw("²")


保存的时候要unicode编码。
17 发表于 2008-04-22 20:37 ·  中国 广东 深圳 罗湖区 电信
初级用户
★★
积分 153
发帖 103
注册 2008-03-27 19:38
18年会员
UID 114210
性别 男
状态 离线
Originally posted by plp626 at 2008-4-21 11:43 PM:
zh159强,羡慕一个!
------------------------------------------
start charmap


里面什么都有啊

我这电脑里面没有字符映射表
18 发表于 2008-04-22 20:38 ·  中国 广东 深圳 罗湖区 电信
初级用户
★★
积分 153
发帖 103
注册 2008-03-27 19:38
18年会员
UID 114210
性别 男
状态 离线
Originally posted by slore at 2008-4-22 03:45 AM:
str = InputBox("输入要查询的字符串","Alt"

麻烦大虾把上面的改成双向查询,再弄个传到剪贴版功能,好吗
MsgBox Ascw("²") 怎么么弹出的还是2呀,我不保存的
²好像能复制粘贴的
19 发表于 2008-04-22 21:49 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
Title = "Alt查询器 By Slore"
Mode = MsgBox("查询ANSI编码选,Unicode选",vbYesNo + 64,Title)
strIn = InputBox("请输入要查询的字符串。" & vbCrLf & "反查以'开头,"";""为间隔符",Title)
If strIn = "" Then MsgBox "谢谢使用此Alt查询器!再见~",64,Title:Wscript.Quit
If Mode = 6 Then
If Left
(strIn,1) = "'" Then
strIn = Mid(strIn,2)
strWord = Split(strIn,";")
For i = 0 To UBound(strWord)
txtOut = txtOut & Chr(strWord(i)) & ":" & strWord(i) & " "
Next
Else
For
i = 1 To Len(strIn)
strChar = Mid(strIn,i,1)
Ascii = Asc(strChar)
If Ascii < 0 Then Ascii = Ascii + &H10000
txtOut = txtOut & strChar & ":" & Ascii & " "
Next
End If
Else
If Left
(strIn,1) = "'" Then
strIn = Mid(strIn,2)
strWord = Split(strIn,";")
For i = 0 To UBound(strWord)
txtOut = txtOut & ChrW(strWord(i)) & ":" & strWord(i) & " "
Next
Else
For
i = 1 To Len(strIn)
strChar = Mid(strIn,i,1)
Ascii = AscW(strChar)
If Ascii < 0 Then Ascii = Ascii + &H10000
txtOut = txtOut & strChar & ":" & Ascii & " "
Next
End If
End If
MsgBox
txtOut,64,Title
20 发表于 2008-04-22 22:10 ·  中国 陕西 西安 电信
铂金会员
★★★★
积分 5,212
发帖 2,478
注册 2007-02-08 23:39
19年会员
UID 79003
性别 男
状态 离线
有剪切板功能的。


Title = "Alt查询器 By Slore"
Mode = MsgBox("查询ANSI编码选,Unicode选",vbYesNo + 64,Title)
strIn = InputBox("请输入要查询的字符串。" & vbCrLf & "反查以'开头,"";""为间隔符",Title)
If strIn = "" Then MsgBox "谢谢使用此Alt查询器!再见~",64,Title:Wscript.Quit
If Mode = 6 Then
If Left
(strIn,1) = "'" Then
strIn = Mid(strIn,2)
strWord = Split(strIn,";")
For i = 0 To UBound(strWord)
txtOut = txtOut & Chr(strWord(i)) & ":" & strWord(i) & " "
Next
Else
For
i = 1 To Len(strIn)
strChar = Mid(strIn,i,1)
Ascii = Asc(strChar)
If Ascii < 0 Then Ascii = Ascii + &H10000
txtOut = txtOut & strChar & ":" & Ascii & " "
Next
End If
Else
If Left
(strIn,1) = "'" Then
strIn = Mid(strIn,2)
strWord = Split(strIn,";")
For i = 0 To UBound(strWord)
txtOut = txtOut & ChrW(strWord(i)) & ":" & strWord(i) & " "
Next
Else
For
i = 1 To Len(strIn)
strChar = Mid(strIn,i,1)
Ascii = AscW(strChar)
If Ascii < 0 Then Ascii = Ascii + &H10000
txtOut = txtOut & strChar & ":" & Ascii & " "
Next
End If
End If
ret = MsgBox(txtOut,vbYesNo + 64,"是否复制到剪切板上?")
If ret = 7 Then Wscript.Quit
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = False:objIE.Navigate("about:blank")
objIE.Document.parentwindow.clipboardData.SetData "text", txtOut
objIE.Quit:Set objIE = Nothing
本帖最近评分记录 (共 2 条) 点击查看详情
评分人分数时间
haiou327 +8 2008-04-23 02:13
kioskboy +2 2008-04-23 17:15
21 发表于 2008-04-23 02:14 ·  中国 广东 汕头 潮阳区 电信
高级用户
★★★
DOS时空
积分 713
发帖 348
注册 2007-02-10 13:59
19年会员
UID 79169
性别 男
状态 离线
厉害ING!!!!!!!!!!!!!!!!!!!!!!!!!
超强
22 发表于 2008-11-16 22:05 ·  中国 山西 忻州 电信
初级用户
★★
积分 87
发帖 63
注册 2008-08-23 11:28
17年会员
UID 123947
性别 男
状态 离线
发个vbs的
'2008-9-13
'定义常用字符
Dim cy
cy="℃αβγπελ∑∞≈≤≥☆★Δ"
a=inputbox("欢迎使用此小程序请输入要转换的字符:"&vbCrLf&"(在QQ,WORD中使用加~。按下EXIT退出)","ALT+数字=汉字",cy)
If a=Empty Then WScript.Quit
while UCase(a)<>"EXIT"
If Mid(a,1,1)="~" And Len(a)=1 Then '只有一个~时
a=inputbox(chr(34)&a& chr(34) & "在HTML,TXT,PPT,XLS中所对应编码为:" & Chr(13) & c(a),"ALT+数字=汉字(强化版)",a)
ElseIf Mid(a,1,1)="~" And Len(a)>1 then '转义字符 在qq,word中使用
a=Right(a,Len(a)-1)
a=inputbox(chr(34)&a& chr(34) & "在QQ,DOC中所对应编码为:" & Chr(13) & q(a),"ALT+数字=汉字",a)
Else
a=inputbox(chr(34)&a& chr(34) & "在HTML,TXT,PPT,XLS中所对应编码为:" & Chr(13) & c(a),"ALT+数字=汉字",a)
End if
If a=Empty Then WScript.Quit
Wend
function c(str) '记事本,excel,ppt,网页中使用的字符转编码函数
c=""
for i=1 to len(str)
c=c&"<"&Hword(Mid(str,i,1))&">"& clng("&H" & Hex(Asc(mid(str,i,1))))&Space(9-Len(clng("&H" & Hex(Asc(mid(str,i,1))))))
next
end function
function q(str) 'qq,word中使用的字符转编码函数
q=""
for i=1 to len(str)
q=q&"<"&Hword(Mid(str,i,1))&">"& clng("&H" & Hex(Ascw(mid(str,i,1))))&Space(9-Len(clng("&H" & Hex(Ascw(mid(str,i,1))))))
next
end function
'左对齐格式化
Function Lstr(str,n)
Lstr=str & Space(n-Len(str))
End Function
'字母汉字格式化
Function Hword(str)
If Asc(str)<0 Then
Hword=str
Else Hword=str &Space(1)
End If
End Function
23 发表于 2008-11-21 10:57 ·  中国 河南 郑州 联通
社区乞丐
积分 -11
发帖 9
注册 2008-11-21 10:18
17年会员
UID 131625
性别 男
状态 离线
收藏!
论坛跳转: