标题:初来贵地,求帮改代码,不胜感激
只看楼主
kk199122
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-4-19
结帖率:0
已结贴  问题点数:20 回复次数:6 
初来贵地,求帮改代码,不胜感激
#include <Sound.au3>HotKeySet("{F4}", "Terminate")HotKeySet("{F2}", "pause")
Opt("WinTitleMatchMode", 2) WinMove("百度","",0,0,740,895)WinMove("Microsoft Office Picture Manager","",740,0,431,410)Opt("MouseClickDownDelay", 0) $sourcepos=MouseGetPos()$sourcepos[0]=759$sourcepos[1]=92


sleep(1000)$colorpos=find0();MouseClick("",$colorpos[0]+21,$colorpos[1]+48,1,0)sleep(1000)dim $destPos[2]$destPos[0]=$colorpos[0]-411$destPos[1]=$colorpos[1]MouseClick("",$colorpos[0],$colorpos[1],1,0)MouseMove($destPos[0],$destPos[1],0)Global $paintcolor[5][3]for $colori=0 to 4 for $colorj=0 to 2 $paintcolor[$colori][$colorj]=PixelGetColor($colorpos[0]+$colori*14,$colorpos[1]+$colorj*14) NextNext
dim $painted[391][291]
$begin=TimerInit()for $replace=1 to 2 for $colori=4 to 0 step -1 for $colorj=2 to 0 step -1 ;MouseMove($destPos[0],$destPos[1]) ;sleep(1000) $destcolor=PixelGetColor($colorpos[0]+$colori*14,$colorpos[1]+$colorj*14) MouseClick("",$colorpos[0]+$colori*14,$colorpos[1]+$colorj*14,1,0) sleep(1000) if $colori=0 and $colorj=1 Then;MouseClick("",$colorpos[0]+21+17,$colorpos[1]+48,1,0) ElseMouseClick("",$colorpos[0]+21,$colorpos[1]+48,1,0) EndIf for $i=0 to 390 step 1 $jrecord=0for $j=0 to 280 step 1 if $painted[$i][$j]=0 Then if PixelGetColor($sourcepos[0]+$i,$sourcepos[1]+$j)=16777215 Then $painted[$i][$j]=1 EndIf if PixelGetColor($sourcepos[0]+$i,$sourcepos[1]+$j)=15526360 Then $painted[$i][$j]=1 EndIf if $colori+$colorj<>0 Then if PaintTest(PixelGetColor($sourcepos[0]+$i,$sourcepos[1]+$j),$destcolor)=1 ThenMouseClick("",$destPos[0]+$i,$destPos[1]+$j,1,0)$painted[$i][$j]=1 EndIf EndIf EndIfNext Next Next Next for $deletearrayi=1 to 390 for $deletearrayj=1 to 290 $painted[$deletearrayi][$deletearrayj]=0 Next NextNext

SoundPlay("c:\windows\media\Windows XP 硬体失败.wav",1)
MouseClick("",$colorpos[0]+36,$colorpos[1]+309,1,0)sleep(10*1000)Send("^{enter}")FileWriteLine("log.txt",int(TimerDiff($begin)/60/1000)&"min")if msgbox(0,"取消关机",int(TimerDiff($begin)/60/1000)&"min",60*10)=-1 Then shutdown(64)
Func Terminate()ExitEndFunc Func pause()sleep(60*1000)EndFunc func PaintTest($pixel,$destcolor) $return=0 $colorii=0 $colorjj=0 $zhireturntemp=999 if $destcolor<>16777215 Then for $colori=0 to 4 for $colorj=0 to 2if color_dis($pixel,$paintcolor[$colori][$colorj])<color_dis($pixel,$paintcolor[$colorii][$colorjj]) Then $colorii=$colori $colorjj=$colorjEndIf Next Next EndIf if $paintcolor[$colorii][$colorjj]=$destcolor then $return=1 Return $returnEndFunc




Func color_mohu($color, $dui_bi_color,$zhi)
$red = BitAND(BitShift($color, 16), 0xFF)
$green = BitAND(BitShift($color, 8), 0xFF)
$blue = BitAND($color, 0xFF)

$redb = BitAND(BitShift($dui_bi_color, 16), 0xFF)
$greenb = BitAND(BitShift($dui_bi_color, 8), 0xFF)
$blueb = BitAND($dui_bi_color, 0xFF)
If ($red > $redb - $zhi) And ($red < $redb+ $zhi) And ($green > $greenb - $zhi) And ($green < $greenb + $zhi) And ($blue > $blueb - $zhi) And ($blue < $blueb + $zhi) Then
Return True
EndIf
Return False
EndFunc
func color_dis($color, $dui_bi_color) $red = BitAND(BitShift($color, 16), 0xFF)
$green = BitAND(BitShift($color, 8), 0xFF)
$blue = BitAND($color, 0xFF)

$redb = BitAND(BitShift($dui_bi_color, 16), 0xFF)
$greenb = BitAND(BitShift($dui_bi_color, 8), 0xFF)
$blueb = BitAND($dui_bi_color, 0xFF)
Return abs($red-$redb)+abs($green-$greenb)+abs($blue-$blueb)EndFunc func detchooseChecksum($i,$j)return PixelChecksum($i-5,$j-5,$i+5,$j+5)endFunc

func find0() for $x=1 to 100 for $y=1 to 300 $xx=int(((-1)^$x)*0.5*$x) $yy=int(((-1)^$y)*0.5*$y) if detchooseChecksum(648+$xx,488+$yy)=818156483 Then$x=100$y=100$returnX=648+$xx$returnY=488+$yy EndIf Next Next dim $returnmax[2] $returnmax[0]=$returnX-65 $returnmax[1]=$returnY+20 return $returnmaxEndFunc

帮忙看看哪里错了 谢谢
搜索更多相关主题的帖子: 百度 410 Microsoft 不胜感激 include 
2013-04-19 21:12
fanpengpeng
Rank: 8Rank: 8
来 自:南极洲
等 级:蝙蝠侠
威 望:7
帖 子:299
专家分:849
注 册:2013-2-1
得分:4 
楼主用的是什么语言

人生是一场错过 愿你别蹉跎
2013-04-19 21:23
kk199122
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-4-19
得分:0 
回复 2楼 fanpengpeng
别人的,说是贴吧的脚本
2013-04-19 22:02
旺旺佳佳
Rank: 2
等 级:论坛游民
帖 子:36
专家分:44
注 册:2013-3-11
得分:4 
头疼啊
2013-04-19 22:23
yctchxf
Rank: 6Rank: 6
来 自:盐城
等 级:侠之大者
威 望:2
帖 子:176
专家分:454
注 册:2012-4-10
得分:4 
表示不懂啊…………………………
2013-04-19 22:26
ysa555
Rank: 2
等 级:论坛游民
帖 子:14
专家分:21
注 册:2013-4-14
得分:4 
居然在C语言区里出现,看不懂~发错地方了吧
2013-04-19 22:34
czzdcn123
Rank: 7Rank: 7Rank: 7
来 自:江西
等 级:黑侠
威 望:3
帖 子:258
专家分:510
注 册:2013-3-7
得分:4 
真心看不懂
2013-04-19 22:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-404895-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026261 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved