原来的贴子在
http://community.csdn.net/Expert/topic/3974/3974913.xml?temp=.8616297我按照朋友说的方法给修改了一下
大致如下count=inputbox("请输入你要发送的次数,只能为不低与0的整数")
yanshi=inputbox("请输入延时,推荐为1000")
neirong=inputbox("你要发送的内容")
if count="" then
msgbox ("你没有输入要发送的次数")
end if
if yanshi="" then
msgbox ("你没有输入延时")
end if
if neirong="" then
msgbox ("你没有输入要发送的内容")
wscript.quit 
end if Set WshShell= WScript.CreateObject("WScript.Shell") 
for i=1 to count
WScript.Sleep yanshi
Clipboard.SetText neirong
WshShell.SendKeys= "^v"
WshShell.SendKeys i 
WshShell.SendKeys "%s" 
next 
但是问题又出来了。我保存为.vbs的时候,出现了  缺少对象 "ciipboard" 
不知道什么原因,找了一些以前的贴看了一下。没搞明白。。
帮忙。

解决方案 »

  1.   

    vbs是没有clipboard对象的count=inputbox("请输入你要发送的次数,只能为不低与0的整数")
    yanshi=inputbox("请输入延时,推荐为1000")
    neirong=inputbox("你要发送的内容")
    if count="" then
    msgbox ("你没有输入要发送的次数")
    end if
    if yanshi="" then
    msgbox ("你没有输入延时")
    end if
    if neirong="" then
    msgbox ("你没有输入要发送的内容")
    wscript.quit 
    end if dim wshell
    set wshell=CreateObject("wscript.shell")
    for i=1 to count
    WScript.Sleep yanshi
    wshell.SendKeys neirong
    next 
      

  2.   

    按照你上面写的是可以了。
    但是还是有点问题
    为什么变量的内容不能为字符?
    只能为数字呢?
    郁闷。。还有就是
    count=inputbox("请输入你要发送的次数,只能为不低与0的整数")
    yanshi=inputbox("请输入延时,推荐为1000")
    neirong=inputbox("你要发送的内容")
    if count="" then
    msgbox ("你没有输入要发送的次数")
    end if
    if yanshi="" then
    msgbox ("你没有输入延时")
    end if
    if neirong="" then
    msgbox ("你没有输入要发送的内容")
    wscript.quit 
    end if dim wshell
    set wshell=CreateObject("wscript.shell")
    for i=1 to count
    WScript.Sleep yanshi
    wshell.SendKeys neirong
    WShell.SendKeys "%s" 
    next 当发送消息的时候,如果我定义了发送100条。但是没发送完。我想结束掉。应该怎么弄?
      

  3.   

    是不是应该对变量neirong转换成字符串变量?
    应该怎么弄哦???