找回密码
 加入
搜索
查看: 3306|回复: 8

AU3里怎么写快捷方式路径里的代码

[复制链接]
发表于 2008-7-22 15:02:05 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 193, 115)
$Button1 = GUICtrlCreateButton("中央五套", 128, 80, 313, 113, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
Case $nMsg = $Button1
Run(@COMSPEC & \' /c ""C:\Program Files\Windows Media Player\wmplayer.exe" /prefetch:1 http://localhost:16900/1.asf"\',"", @SW_HIDE)
        EndSwitch
WEnd
我这个为什么执行不起来,那里错了,希望高手指教!谢谢

[ 本帖最后由 linzhixin 于 2008-7-26 12:23 编辑 ]
发表于 2008-7-22 15:07:47 | 显示全部楼层
我只看到你run里多了个“\”。
 楼主| 发表于 2008-7-23 12:09:14 | 显示全部楼层
不行,我去掉了那个也不行
发表于 2008-7-23 15:43:25 | 显示全部楼层
为什么要加@comspec,命令行运行?
发表于 2008-7-23 16:42:47 | 显示全部楼层
既然要看电视 后面还加上隐藏执行参数@SW_HIDE干嘛?
另外 RUN里的东东有点错
自己MSGBOX查看就知道了
发表于 2008-7-24 16:30:49 | 显示全部楼层
FileCreateShortcut 函数可以创建快捷方式。
发表于 2008-7-24 23:19:36 | 显示全部楼层
Run(@COMSPEC & \' /c ""C:\Program Files\Windows Media Player\wmplayer.exe" /prefetch:1 http://localhost:16900/1.asf"\',"", @SW_HIDE)    这句出错了``         \'    这个`?
发表于 2008-7-25 08:14:47 | 显示全部楼层
run那行写的是真太那个了……

不知道楼主想在两边分别加个“/”是什么意思,如果不带“/”是下面这样写

Run(@ComSpec &" /c "&Chr(34)&"C:\Program Files\Windows Media Player\wmplayer.exe"&Chr(34)&" /prefetch:1 http://localhost:16900/1.asf") 


[ 本帖最后由 skyfree 于 2008-7-25 08:18 编辑 ]
 楼主| 发表于 2008-7-26 12:23:02 | 显示全部楼层
呵呵,谢谢,小弟刚学没几天
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-18 08:12 , Processed in 0.078832 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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