找回密码
 加入
搜索
查看: 2283|回复: 3

[系统综合] 求教高手用AU3写VBS文件,VBS文件内容如下

[复制链接]
发表于 2010-11-1 23:37:44 | 显示全部楼层 |阅读模式
Option Explicit
Dim WshShell
on error resume next
set WshShell=Wscript.CreateObject("Wscript.Shell")
WshShell.run ("C:\Progra~1\Intern~1\iexplore.exe http://www.baidu.com")
set WshShell = nothing
最好网址读INI配置文件里面设置的网址
IE.INI
[IE]
URL=http://www.baidu.com
发表于 2010-11-2 00:11:33 | 显示全部楼层
回复 1# zzbtlc
#include <IE.au3>
$ie = IniRead ( "IE.ini", "IE", "URL","" )
$oIE = _IECreate ($ie)
发表于 2010-11-2 03:23:15 | 显示全部楼层
ShellExecute(IniRead ( "IE.ini", "IE", "URL","" ))
 楼主| 发表于 2010-11-2 09:56:13 | 显示全部楼层
主要问题不在读INI上面,是不知道
$file = FileOpen("IE.VBS", 1)
; 检查打开的文件是否可写
If $file = -1 Then
    MsgBox(0, "错误", "不能打开文件.")
    Exit
EndIf
FileWriteLine($file, "Option Explicit")
FileWriteLine($file, "Dim WshShell" & @CRLF)
FileWriteLine($file, "on error resume next" & @CRLF)
下面这几行不会写。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-4 23:39 , Processed in 0.082897 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表