脚本在文件中定位到选定行

来源:互联网 发布:腾讯软件中心 编辑:程序博客网 时间:2024/06/08 13:39
set wshshell = CreateObject("WScript.Shell")
line = inputBox("Which line do you want to mark?")
if not IsNumeric(line) then
MsgBox "You did not specify a number!"
WScript.Quit
else
line = Fix(line)
if line<1 then
MsgBox "Your line number is invalid!"
WScript.Quit
end if
end if
WScript.Sleep(200)
wshshell.SendKeys "^{HOME}"
for x=1 to line-1
wshshell.SendKeys "{DOWN}"
WScript.Sleep 10
next

wshshell.SendKeys "{HOME}"
wshshell.SendKeys "+{END}"
阅读全文
1 0
原创粉丝点击