<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Бот для WAP игры]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=18031&amp;type=atom" />
	<updated>2023-12-12T09:56:08Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=18031</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Бот для WAP игры]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=159703#p159703" />
			<content type="html"><![CDATA[<p>Вот само меню игры - <a href="https://imgur.com/3EVTph0">https://imgur.com/3EVTph0</a></p>]]></content>
			<author>
				<name><![CDATA[D03A]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40299</uri>
			</author>
			<updated>2023-12-12T09:56:08Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=159703#p159703</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Бот для WAP игры]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=159702#p159702" />
			<content type="html"><![CDATA[<p>Доброго времени суток, ребят подскажите пожалуйста в чем может быть проблема, он не кликает на кнопку &quot;Вытянуть&quot;. <br />Игра &quot;Легенда Крови&quot; - <a href="https://legendsgame.ru/">https://legendsgame.ru/</a> <br />Вот сам код который получилось собрать:<br /></p><div class="codebox"><pre><code>
#NoEnv
#SingleInstance Force
SendMode Input
SetWorkingDir %A_ScriptDir%

ImagesFolder := A_ScriptDir &quot;\images&quot;
TargetText := &quot;Вытянуть&quot;

FileGetSize, FolderSize, %ImagesFolder%
if (FolderSize = &quot;&quot;) {
  MsgBox Папка с изображениями не найдена!
  ExitApp  
}

ImagesPath := []
Loop Files, %ImagesFolder%\*.png, FR
  ImagesPath.Push(A_LoopFilePath)   

if (ImagesPath.Length() = 0) {
  MsgBox Изображения PNG не найдены!
  ExitApp
}
 
F2::Pause 

Loop {

  Sleep 1000
  
  for index, imgPath in ImagesPath {

    ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 %imgPath%

    if (ErrorLevel = 0) {
    
      MouseGetPos, OriginalX, OriginalY  
            
      ImageSearch, TextX, TextY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 *TransBlack %TargetText%
      
      if (!ErrorLevel) {        
        MouseClick, left, TextX, TextY, 1, 0 
        MouseMove, OriginalX, OriginalY                       
      }
      else 
        MsgBox, Текст &quot;%TargetText%&quot; не найден!
    
    }

  }

}

Esc::ExitApp
</code></pre></div><p>Принцип какой, рыба подплывает к крючку и нужно вытаскивать. Прикреплю фото какие я добавил. <br />Если надо могу предоставить аккаунт для тестов.<br />Вот фото которые стоят на поиск:<br /><a href="https://imgur.com/phk3ivu">https://imgur.com/phk3ivu</a><br /><a href="https://imgur.com/JUOGKfM">https://imgur.com/JUOGKfM</a><br /><a href="https://imgur.com/LO2jLvJ">https://imgur.com/LO2jLvJ</a></p>]]></content>
			<author>
				<name><![CDATA[D03A]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40299</uri>
			</author>
			<updated>2023-12-12T09:54:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=159702#p159702</id>
		</entry>
</feed>
