每天定时8点和23点各运行一次,怎样写啊?新手。
我是用来执行游戏外挂的,自动设置已经写好了,现在就是需要:----------------------------------------------------------------------------------------------------------
每天早上8点执行以下:
ileCopy("C:\Documents and Settings\Administrator\桌面\au3\*.txt","C:\wwtemp.txt",1)
run("软件.exe")
$11="脱机挂机"
WinWaitActive($11)
Send("{ENTER}")
winActivate("打开")
controlClick("打开","","")
send("c:\wwtemp.txt")
controlClick("打开","打开(&O)","Button2")
WinActive($11)
controlClick($11,"挂机","TButton9")
然后晚上11点又执行以下的:
WinActivate("脱机挂机")
Send("{TAB}")
send("{ENTER}")
Sleep(1500)
Winkill("脱机挂机","")
----------------------------------------------------------------------------------------------------------
每天重复这样的操作。我已经搜索论坛上的贴子了,但我笨,不会变通,肯定大家的帮助,谢谢你。
[ 本帖最后由 dgdj 于 2008-12-8 10:17 编辑 ] 已解决问题版块有哦。 我刚刚接触这个东东,不会变通哦。楼主,可以教下我吗?
我上面那些看了一天才搞出来的。
谢谢。 While 1
Switch @hour&@min
case 0800
fileCopy("C:\Documents and Settings\Administrator\桌面\au3\*.txt","C:\wwtemp.txt",1)
run("软件.exe")
$11="脱机挂机"
WinWaitActive($11)
Send("{ENTER}")
winActivate("打开")
controlClick("打开","","")
send("c:\wwtemp.txt")
controlClick("打开","打开(&O)","Button2")
WinActive($11)
controlClick($11,"挂机","TButton9")
Case 2300
WinActivate("脱机挂机")
Send("{TAB}")
send("{ENTER}")
Sleep(1500)
Winkill("脱机挂机","")
EndSwitch
WEnd
[ 本帖最后由 superflq 于 2008-12-8 08:33 编辑 ] superflq你好,
先谢谢你的帮助,我刚才试了一下,8点运行那段,到了8点时一直运行,这样的话我会一直打开很多游戏外挂,现在我想只运行一次,然后到23点又运行一次。每天都这样重复。
谢谢。 While 1
Switch @hour&@min&@SEC
case 080000
fileCopy("C:\Documents and Settings\Administrator\桌面\au3\*.txt","C:\wwtemp.txt",1)
run("软件.exe")
$11="脱机挂机"
WinWaitActive($11)
Send("{ENTER}")
winActivate("打开")
controlClick("打开","","")
send("c:\wwtemp.txt")
controlClick("打开","打开(&O)","Button2")
WinActive($11)
controlClick($11,"挂机","TButton9")
Case 230000
WinActivate("脱机挂机")
Send("{TAB}")
send("{ENTER}")
Sleep(1500)
Winkill("脱机挂机","")
EndSwitch
WEnd 这样,你试试看,不行的话,就在
EndSwitch
后面加个SLEEP(1000) 想了想应该比较好点:
While 1
Switch @hour&@min
case 0800
fileCopy("C:\Documents and Settings\Administrator\桌面\au3\*.txt","C:\wwtemp.txt",1)
run("软件.exe")
$11="脱机挂机"
WinWaitActive($11)
Send("{ENTER}")
winActivate("打开")
controlClick("打开","","")
send("c:\wwtemp.txt")
controlClick("打开","打开(&O)","Button2")
WinActive($11)
controlClick($11,"挂机","TButton9")
sleep(60000)
Case 2300
WinActivate("脱机挂机")
Send("{TAB}")
send("{ENTER}")
Sleep(1500)
Winkill("脱机挂机","")
sleep(60000)
EndSwitch
sleep(100)
WEnd
While 1
Select @HOUR = 08 And Not WinExists("脱机挂机")
FileCopy("C:\Documents and Settings\Administrator\桌面\au3\*.txt","C:\wwtemp.txt",1)
run("软件.exe")
$11="脱机挂机"
WinWaitActive($11)
Send("{ENTER}")
winActivate("打开")
controlClick("打开","","")
send("c:\wwtemp.txt")
controlClick("打开","打开(&O)","Button2")
WinActive($11)
controlClick($11,"挂机","TButton9")
;然后晚上11点又执行以下的:
Select @HOUR = 23 And WinExists("脱机挂机")
WinActivate("脱机挂机")
Send("{TAB}")
send("{ENTER}")
Sleep(1500)
Winkill("脱机挂机","")
EndSelect
Sleep(90)
WEnd
一秒钟能执行两次,加加延时后就正常了,成功啦,谢谢 superflq ,太感谢你了。:face (36): 哗,令我太感动了,谢谢superflq、liongodmien。我搞电了。谢谢两位的帮助。 pcbar,支持. 万一进睡眠了就不能用了,但还是顶一下 呵呵,还是高手多啊 very good, nice to have it
页:
[1]
2