Так почему бы не попытать счастья в Столе заказов?Nik_rus, суть в том, что я не уверен, что кто-то будет помогать, а будет так же умничать, вам туда, вам сюда.
если будет помощь предложена от кого-то, кул, нет буду сам писать, просто времени нет. А бот нужен уже или как можно быстрее
А почему не показали? Если уж "мы" пишем бота, то давайте делитесь, телепатов нет.у меня есть наработки с друго проекта
шта? Автоматизация - это решение для тех, кому лень выполнять рутинные задачи, а не тех, кому лень автоматизировать.Автоматизация - ни что иное как лень
Лень истенный двигатель прогресса, однажды и человек заметил что круглое катить легче чем квадратное.winstan, совсем забыл, уважаемый, Автоматизация - ни что иное как лень!
#include-once
; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.0
; Language: English
; Description: Functions that assist with Image Search
; Require that the ImageSearchDLL.dll be loadable
;
; ------------------------------------------------------------------------------
;===============================================================================
;
; Description: Find the position of an image on the desktop
; Syntax: _ImageSearchArea, _ImageSearch
; Parameter(s):
; $findImage - the image to locate on the desktop
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
;
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
;
; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify
; a desktop region to search
;
;===============================================================================
Func _ImageSearch($findImage,$resultPosition,ByRef $x, ByRef $y,$tolerance)
return _ImageSearchArea($findImage,$resultPosition,0,0,@DesktopWidth,@DesktopHeight,$x,$y,$tolerance)
EndFunc
Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef $x, ByRef $y, $tolerance)
;MsgBox(0,"asd","" & $x1 & " " & $y1 & " " & $right & " " & $bottom)
if $tolerance>0 then $findImage = "*" & $tolerance & " " & $findImage
$result = DllCall("ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage)
; If error exit
if $result[0]="0" then return 0
; Otherwise get the x,y location of the match and the size of the image to
; compute the centre of search
$array = StringSplit($result[0],"|")
$x=Int(Number($array[2]))
$y=Int(Number($array[3]))
if $resultPosition=1 then
$x=$x + Int(Number($array[4])/2)
$y=$y + Int(Number($array[5])/2)
endif
return 1
EndFunc
;===============================================================================
;
; Description: Wait for a specified number of seconds for an image to appear
;
; Syntax: _WaitForImageSearch, _WaitForImagesSearch
; Parameter(s):
; $waitSecs - seconds to try and find the image
; $findImage - the image to locate on the desktop
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
;
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
;
;
;===============================================================================
Func _WaitForImageSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance)
$waitSecs = $waitSecs * 1000
$startTime=TimerInit()
While TimerDiff($startTime) < $waitSecs
sleep(100)
$result=_ImageSearch($findImage,$resultPosition,$x, $y,$tolerance)
if $result > 0 Then
return 1
EndIf
WEnd
return 0
EndFunc
;===============================================================================
;
; Description: Wait for a specified number of seconds for any of a set of
; images to appear
;
; Syntax: _WaitForImagesSearch
; Parameter(s):
; $waitSecs - seconds to try and find the image
; $findImage - the ARRAY of images to locate on the desktop
; - ARRAY[0] is set to the number of images to loop through
; ARRAY[1] is the first image
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
;
; Return Value(s): On Success - Returns the index of the successful find
; On Failure - Returns 0
;
;
;===============================================================================
Func _WaitForImagesSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance)
$waitSecs = $waitSecs * 1000
$startTime=TimerInit()
While TimerDiff($startTime) < $waitSecs
for $i = 1 to $findImage[0]
sleep(100)
$result=_ImageSearch($findImage[$i],$resultPosition,$x, $y,$tolerance)
if $result > 0 Then
return $i
EndIf
Next
WEnd
return 0
EndFunc
;===========================================================================================================
;@Author Ewvyx I wrote this so please don't slap your name on it.
;This script searches the desktop for a specified image.
;It is useful for testing whether or not your images can be found using the other scripts.
;It is designed for a 1920x1080 display
#RequireAdmin
#include <ImageSearch.au3>
$img = "chiron" ;Change this to the name of the image you want to find
;===========================================================================================================
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("q","findImage")
Global $Paused
Global $gX = 0
Global $gY = 0
Global $pics = @ScriptDir & "\"
$managogsDir = $pics & "Managogs\"
$buttonsDir = $pics & "Buttons\"
$farmDir = $pics & "Farm\"
$astralsDir = $pics & "Astrals\"
$imgExt = ".bmp"
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Func Terminate()
Exit 0
EndFunc ;==>Terminate
Func findImage()
ToolTip("")
$result = _ImageSearch($astralsDir & $img & $imgExt,1,$gX,$gY,70) ;<=== Change the $...Dir variable to the Directory of your choice.
If $result = 1 Then
ToolTip("")
MsgBox(0,"Result","Found!")
MouseMove($gX, $gY, 10)
Else
ToolTip("Nope",0,0)
EndIf
EndFunc
While 1
ToolTip("Press 'q' to begin",0,0)
Sleep(100)
WEnd
Иногда стоит думать и том, что проблема именно в Вас, в частности "либо я чего-то в этой жизни не понимаю". Об этом тут было неоднократно сказано.mef-t, насколько я понимаю, либо это разговор слепого с глухим по скайпу, либо я чего-то в этой жизни не понимаю.