''本宏用于检测自动翻译引起的快捷键标识符 "&" 的问题。共分两种情况：⒈原始词条中没有 "&" 符号而翻译后出现 (X) 的问题，如：File->文件(F)。⒉原始词条中有 "&" 符号而翻译后位置不正确的问题，如：&File->&文件(F)。其实这两种情况都是因为 Passolo 自动翻译时不处理 "&" 符号所引起的！

Public Sub PSL_OnCheckString(TransString As PslTransString)
Dim srcstring As String
Dim trgstring As String
Dim return As Integer
Dim returnsrc As Integer
Dim returntrg As Integer
Dim returntrgkey As Integer
Dim shortcutkeysrc As String
Dim shortcutkeytrg As String
Dim shortcutkey As String
Dim result As Integer
Dim st As Integer
srcstring=TransString.SourceText
trgstring=TransString.Text
return=InStr(srcstring,"&")
returnsrc=InStr(srcstring,")")
returntrg=InStr(trgstring,")")
returntrgkey=InStr(trgstring,"&")
st=StrComp(TransString.SourceText,TransString.Text)
If st=0 Then Exit Sub
If return<>0 Then
	If returntrgkey=1 Then
	TransString.OutputError("在原始字符串中有快捷键符号，但译文中缺少或位置错误，请检查！")
	Exit Sub
	End If
	shortcutkeysrc=Mid(srcstring,return+1,1)
	shortcutkeytrg=Mid(trgstring,returntrgkey-1,4)
	shortcutkey="(" & "&" & StrConv(shortcutkeysrc,vbUpperCase) & ")"
	result=StrComp(shortcutkey,shortcutkeytrg)
	If result<>0 Then TransString.OutputError("在原始字符串中有快捷键符号，但译文中缺少或位置错误或是快捷键错误，请检查！")
Else
	If returnsrc<>0 Then Exit Sub
	If returntrg<>0 Then TransString.OutputError("在原始字符串没有快捷键符号而译文中出现了 (X)，请检查！")
End If
End Sub
