找回密码
 加入
搜索
查看: 1126|回复: 4

热键这样定错了吗???只是求加一个激活和退出的按键

[复制链接]
发表于 2009-6-4 11:01:34 | 显示全部楼层 |阅读模式
本帖最后由 lin6163 于 2009-6-5 22:40 编辑

#NoTrayIcon
HotKeySet("!+l", "Start")
HotKeySet("!+m", "myExit")

While 1
sleep(10)
WEnd

Func myExit()
    Exit
EndFunc

func Start()
HotKeySet("+r", "radmin")
HotKeySet("+s", "VNC")
HotKeySet("+c", "exit1")

While 1
sleep(10)
WEnd

Func radmin()
    run("C:\WINDOWS\system\a.exe")
EndFunc

func VNC()
        run("C:\WINDOWS\system\b.exe")
endfunc

func exit1()
    $aa = MsgBox ( 1+32, "警告", "你是否要退出!" )
if $aa = 1 Then
exit
EndIf
endfunc
endfunc
发表于 2009-6-4 12:58:46 | 显示全部楼层
不懂,留个名,有答案了好来看,学一学
发表于 2009-6-4 13:31:46 | 显示全部楼层
本帖最后由 lynfr8 于 2009-6-4 13:35 编辑
 #NoTrayIcon
HotKeySet("!+l", "Start")
HotKeySet("!+m", "myExit")

While 1
sleep(10)
WEnd;你用了2次循环语句

func Start()
HotKeySet("+r", "radmin")
HotKeySet("+s", "VNC")
HotKeySet("+c", "exit1")
endfunc;就是这里你处理的不好,对热键的语法结构好像你还不是很清晰

Func myExit()
    Exit 
EndFunc 

Func radmin()
    run("C:\WINDOWS\system\a.exe") 
EndFunc 

func VNC()
        run("C:\WINDOWS\system\b.exe")
EndFunc 

func exit1()
    $aa = MsgBox ( 1+32, "警告", "你是否要退出!" )
If $aa = 1 Then
Exit
EndIf
Endfunc
发表于 2009-6-4 13:52:58 | 显示全部楼层
学习了,13:51把#3保存到126
 楼主| 发表于 2009-6-5 22:40:16 | 显示全部楼层
谢谢
lynfr8
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-27 23:58 , Processed in 0.072307 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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