[已解决]读取INI中的网址无法打开!
是这样的,在GUI界面假如我有1、2、3、4、5这几个按钮,这五个按钮和按钮返回值我都是从配置文件中读取的!按钮名称显示正常,但无法执行!在RUN前使用msgbox(0,"",$wz)显示读取的值都是对的,无法打开网页,不知道是不是RUN这句错误!直接给地址又能运行!代码如下:
$config="config.ini"
$name=IniRead($config,"按钮","按钮名1","专线影院")
$name=IniRead($config,"按钮","按钮名2","专线影院")
$name=IniRead($config,"按钮","按钮名3","专线影院")
$name=IniRead($config,"按钮","按钮名4","专线影院")
$name=IniRead($config,"按钮","按钮名5","专线影院")
$wz=IniRead($config,"网址","网址1","http://20.20.2.102/webmedia/html/index.shtml")
$wz=IniRead($config,"网址","网址2","http://v.tfol.com/netbar.aspx")
$wz=IniRead($config,"网址","网址3","http://192.168.0.136")
$wz=IniRead($config,"网址","网址4","http://192.168.0.136")
$wz=IniRead($config,"网址","网址5","http://192.168.0.136")
$Button = GUICtrlCreateButton($name, 84, 63, 60, 30)
$Button = GUICtrlCreateButton($name, 154, 63, 60, 30)
$Button = GUICtrlCreateButton($name, 224, 63, 60, 30)
$Button = GUICtrlCreateButton($name, 294, 63, 60, 30)
$Button = GUICtrlCreateButton($name, 364, 63, 60, 30)
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe" & $wz)
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe" & $wz)
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe" & $wz)
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe" & $wz)
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe" & $wz)
config.ini如下:
[按钮]
按钮名1=1专线影院
按钮名2=天符宽屏
按钮名3=网吧影院
按钮名4=预留影院
按钮名5=预留影院
[网址]
网址1="http://20.20.2.102/webmedia/html/index.shtml"
网址2="http://v.tfol.com/netbar.aspx"
网址3="http://192.168.0.136"
网址4="http://192.168.0.136"
网址5="http://192.168.0.136"
[ 本帖最后由 jycel 于 2009-3-22 22:19 编辑 ] 空格问题吧?
如
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $wz)
iexplore.exe 后要有空格 原帖由 zjimmy 于 2009-3-22 22:13 发表 http://www.autoitx.com/images/common/back.gif
空格问题吧?
如
Case $Button
Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $wz)
iexplore.exe 后要有空格
:face (34): 确实是空格问题!iexplore.exe "中间有一个空格,我没有!
页:
[1]