找回密码
 加入
搜索
查看: 5774|回复: 9

[系统综合] 如何用AU3给快捷方式目标文件加参数????

  [复制链接]
发表于 2015-5-21 17:36:48 | 显示全部楼层 |阅读模式
试过快捷方式函数,无法给目标加参数。

例如某快捷方式。
目标是“C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe”
我要把他改为C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe www.baidu.com     

如何实现?
发表于 2015-5-21 18:07:28 | 显示全部楼层
回复 1# qq4045728


这个有用不?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2015-5-22 11:53:11 | 显示全部楼层
回复 2# 邪恶海盗


    试过了,没有用。用了就创建失败!
发表于 2015-5-22 16:54:00 | 显示全部楼层
软件本身是不是允许参常外调用???
发表于 2015-5-22 21:48:27 | 显示全部楼层
回复 4# f4李文杨


    有可能,我的印象中某些流览器是支持带网址运行的,比如"XX.exe -www.hidao.org",楼主先多测试几次看到底支持什么模式
发表于 2015-5-23 11:48:33 | 显示全部楼层
如图所示.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2015-5-23 12:10:44 | 显示全部楼层
回复 5# 邪恶海盗

全部都支持的。 关键是在后面加上网址,这个快捷方式就创建失败了。。 可能这个函数比较严格吧
发表于 2015-5-24 17:23:11 | 显示全部楼层
FileCreateShortcut("C:\Program Files (x86)\Mozilla Firefox\firefox.exe", @DesktopDir & "\Firefox.lnk", "C:\Program Files (x86)\Mozilla Firefox", "www.baidu.com", "这是火狐的快捷方式;-)")
搞不明白为什么自己写的就不行,但是用帮助文件里面的自己改一下路径却可以。
但是我这里火狐的快递方式加参数好像并不能打开指定的网址呀,难道是我的火狐版本的原因?
发表于 2015-5-25 01:50:14 | 显示全部楼层
本帖最后由 freedom 于 2015-5-25 01:51 编辑

回复 8# luren666
        
Global $url = "http://www.2345.com/"
Local $array = FileGetShortcut("C:\Users\Administrator\Desktop\360安全浏览器6.lnk")
        If $array[2] <> $url Then
                FileDelete("C:\Users\Administrator\Desktop\360安全浏览器6.lnk")
                FileCreateShortcut("C:\Users\Administrator\AppData\Roaming\360se6\Application\360se.exe", "C:\Users\Administrator\Desktop\360安全浏览器6.lnk", "", "http://www.2345.com/")
                FileCreateShortcut("C:\Users\Administrator\AppData\Roaming\360se6\Application\360se.exe", "C:\Users\Administrator\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\360安全浏览器6.lnk", "", "http://www.2345.com/")
                DllCall("user32.dll", "int", "SendMessageTimeout", "hwnd", 65535, "int", 26, "int", 0, "int", 0, "int", 0, "int", 1000, "str", "dwResult")
                DllCall("shell32.dll", "ptr", "SHChangeNotify", "long", 134217728, "int", 0, "ptr", 0, "ptr", 0)
        EndIf
给你一段这个试一下。
发表于 2015-5-25 01:53:14 | 显示全部楼层
回复 8# luren666


    你的这段代码运行没有问题啊?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-26 21:27 , Processed in 0.086226 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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