博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
全自动化准备XML文档
阅读量:4120 次
发布时间:2019-05-25

本文共 3766 字,大约阅读时间需要 12 分钟。

 喜欢的话考去用用,不过先声明,对本程序造成的后果我不负责任哦。
'clickIf Wscript.Arguments.Count=0 Then  Msgbox "This Version is extreme dangerous, and it maybe harmful to your computer."+ chr(13)+_		"Please make sure this vbs is in the same folder of your xml file.",48,"prompt"  Wscript.Quit  End If  'startset wshell = CreateObject("Wscript.Shell")'For i=0 to Wscript.Arguments.Count-1  	singlePath=Wscript.Arguments(0)  'next'start wordpadwith wshell	.Run "wordpad """ + singlePath + """"	Wscript.Sleep 1000		.SendKeys("%")	Wscript.Sleep 100	.SendKeys("f")	Wscript.Sleep 100	.SendKeys("a")	Wscript.Sleep 100	.SendKeys("{TAB}")	Wscript.Sleep 100	.SendKeys("{DOWN}")	Wscript.Sleep 100	.SendKeys("{UP}")	Wscript.Sleep 100	.SendKeys("{ENTER}")	Wscript.Sleep 100	.SendKeys("{ENTER}")	Wscript.Sleep 100	.SendKeys("%{F4}")end with	 Wscript.Sleep 1000	 'START wordrtfpaths = split(singlePath,".")rtfpath = rtfpaths(0)+".rtf"with wshell	.Run "winword """ + rtfpath + """"	Wscript.Sleep 2000	'if you have no sadd..style plz del this module	.SendKeys("%{F8}")	Wscript.Sleep 100	.SendKeys("s")	Wscript.Sleep 100	.SendKeys("a")	Wscript.Sleep 100	.SendKeys("{DOWN}")	Wscript.Sleep 100	.SendKeys("{ENTER}")	Wscript.Sleep 100	'----------------------------	Wscript.Sleep 1000		.SendKeys("%")	Wscript.Sleep 100	.SendKeys("e")	Wscript.Sleep 100	.SendKeys("f")	enter_text("/<*/>")	Wscript.Sleep 100	.SendKeys("{TAB}")	Wscript.Sleep 100	.SendKeys(" ")	Wscript.Sleep 100		send_key_by_time "{TAB}",2	.SendKeys(" ")	Wscript.Sleep 100	send_key_by_time "{TAB}",4		.SendKeys(" ")	Wscript.Sleep 100		send_key_by_time "+{TAB}",2	.SendKeys(" ")	Wscript.Sleep 100	.SendKeys("%{F4}")	Wscript.Sleep 100		'set style	call_style	send_key_by_time "{DOWN}",6	.SendKeys("{ENTER}")	Wscript.Sleep 100		'------------------------here may not be use or should be modified---------------	send_key_by_time "{ESC}",4		send_word_search	' enter text	enter_text("text=""*""")	send_key_by_time "{TAB}",4	.SendKeys(" ")	Wscript.Sleep 100	.SendKeys("%{F4}")	Wscript.Sleep 100		' set style = clear	call_style	send_key_by_time "{UP}",6	.SendKeys("{ENTER}")	Wscript.Sleep 100		'seasrch text="	send_word_search	enter_text("text=""")	send_key_by_time "{TAB}",4	.SendKeys(" ")	Wscript.Sleep 100	.SendKeys("%{F4}")	Wscript.Sleep 100		call_style	send_key_by_time "{DOWN}",6	.SendKeys("{ENTER}")	Wscript.Sleep 100	'search "/>	send_word_search	enter_text("""/>")	send_key_by_time "{TAB}",6	send_key_by_time " ",1	send_key_by_time "+{TAB}",3	send_key_by_time " ",3	.SendKeys("%{F4}")	Wscript.Sleep 100		call_style	.SendKeys("{ENTER}")	Wscript.Sleep 100		' search &*;	send_word_search	enter_text("&*;")	send_key_by_time "{TAB}",7	send_key_by_time " ",1	send_key_by_time "+{TAB}",2	send_key_by_time " ",3	.SendKeys("%{F4}")	Wscript.Sleep 100			call_style	send_key_by_time "{DOWN}",1	.SendKeys("{ENTER}")	Wscript.Sleep 100		send_word_search	.SendKeys("+5") '%	enter_text("[0-9a-zA-Z]")	send_key_by_time "{TAB}",4	send_key_by_time " ",4	.SendKeys("%{F4}")	Wscript.Sleep 100		call_style	.SendKeys("{ENTER}")	Wscript.Sleep 100	'--------------------------END----------------------------------	Wscript.Sleep 1000		.SendKeys("%{F4}")	Wscript.Sleep 100	.SendKeys("y")	Wscript.Sleep 100end with' subssub call_style	set wshell = CreateObject("Wscript.Shell")	with wshell		.SendKeys("%")		Wscript.Sleep 100		.SendKeys("o")		Wscript.Sleep 100		.SendKeys("s")		Wscript.Sleep 100	end withend subsub enter_text(textin)	set wshell = CreateObject("Wscript.Shell")	wshell.SendKeys(textin)	Wscript.Sleep 100end subsub send_word_search	set wshell = CreateObject("Wscript.Shell")	wshell.SendKeys("^f")	Wscript.Sleep 100end subsub send_key_by_time(keyname,times)	set wshell = CreateObject("Wscript.Shell")	for ic=0 to times-1		wshell.SendKeys(keyname)		Wscript.Sleep 100	nextend sub

转载地址:http://hrnpi.baihongyu.com/

你可能感兴趣的文章
vue 遍历对象并动态绑定在下拉列表中
查看>>
Vue动态生成el-checkbox点击无法选中的解决方法
查看>>
python __future__
查看>>
MySQL Tricks1
查看>>
python 变量作用域问题(经典坑)
查看>>
pytorch
查看>>
pytorch(二)
查看>>
pytorch(三)
查看>>
pytorch(四)
查看>>
pytorch(5)
查看>>
pytorch(6)
查看>>
ubuntu相关
查看>>
C++ 调用json
查看>>
nano中设置脚本开机自启动
查看>>
动态库调动态库
查看>>
Kubernetes集群搭建之CNI-Flanneld部署篇
查看>>
k8s web终端连接工具
查看>>
手绘VS码绘(一):静态图绘制(码绘使用P5.js)
查看>>
手绘VS码绘(二):动态图绘制(码绘使用Processing)
查看>>
基于P5.js的“绘画系统”
查看>>