VB如何实现全局钩子

来源:百度知道 编辑:UC知道 时间:2024/05/28 03:02:21
如题`给个实例就行了`麻烦在每句旁边注明意思`简单点

OutputFile.Cells(1, 1) = "BSC"
OutputFile.Cells(1, 2) = "CODE"
OutputFile.Cells(1, 3) = "NAME"
OutputFile.Cells(1, 4) = "STATE"
OutputFile.Cells(1, 5) = "CAPACITY"
OutputFile.Cells(1, 6) = "USED"
OutputFile.Cells(1, 7) = "REQUEST STATUS"
Dim nun
nun = 1
txtdate = ""
'读文本,用字符型表示
Do While Not EOF(1)
Line Input #1, bb
txtdate = txtdate & bb
Loop
Debug.Print txtdate
'分解字符串txtdate,总的数据量用B表示
b = Split(txtdate, "LICENCE AND FEATURE HANDLING COMMAND <W7_> < ! ------------------------------------------------------------------------!")

For i = 0 To UBound(b) - 1
'消除多重空格
Do While InStr(b(i), " ") > 0
b(i) = Replace(b(i), " ", &quo