- 听众
- 收听
- 积分
- 555
- 主题
- 回帖
- 0
- 精华
注册时间2008-5-1
最后登录1970-1-1
该用户从未签到
|
经常有网友提到这问题,很头疼,以前我就将方法告之,但很多人还是不会用
现在再一次的写下.
1. 打开VB6创建一个新工程,点击工程右上角的Form1窗体将它移除。本程序无需界面,只要两个对话框就行了。
2. 点击“工程”菜单下的“添加模块”,加入一个新的模块,给它起个名字为:PrPatch。
3. 在模块中输入以下程序:
Option Explicit
Dim DiskW As String
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Sub Main()
Dim WinLong As Long, WinLocate As String * 40
If MsgBox("本程序用于更正Premiere Pro输入汉字时字体名称显示不正确的问题。运行吗?", vbOKCancel + vbInformation, "补丁:") = vbCancel Then End
WinLong = GetWindowsDirectory(WinLocate, 40)
DiskW = Left(WinLocate, 2)
ProcessFile
MsgBox "汉字输入补丁完成!", vbOKOnly + vbInformation, "祝贺你:"
End Sub
Private Sub ProcessFile()
Dim TextOne As String, TextLine(8000) As String, i As Long, NowString As String * 1, j As Integer, BL As Integer
DiskW = DiskW & "\Program Files\Common Files\Adobe\TypeSpt\
AdobeFnt07.lst"
'将一个文件以行为单位放入数组
Open DiskW For Input As #1
Input #1, TextOne
j = 1
For i = 1 To Len(TextOne)
NowString = Mid$(TextOne, i, 1)
If NowString = Chr(10) Then
j = j + 1
Else
TextLine(j) = TextLine(j) + NowString
End If
Next i
Close #1
'查找
For i = 1 To j - 1
If Left(TextLine(i), 11) = "Fami
lyName:" Then
BL = i
Else
If Left(TextLine(i), 8) = "WinName:" Then
TextLine(BL) = Left(TextLine(BL), 11) & Mid$(TextLine(i), 9)
End If
End If
Next
Open DiskW For Output As #1
For i = 1 To j - 1
Print #1, TextLine(i)
Next
Close #1
End Sub
4. 点击“文件”菜单下的“生成PrPatch.exe”,完成。
|
|