<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.atitd.org/wiki/t6w/index.php?action=history&amp;feed=atom&amp;title=User%3ACegaiel%2FMacros%2FPopUpCloser%2FCode</id>
	<title>User:Cegaiel/Macros/PopUpCloser/Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.atitd.org/wiki/t6w/index.php?action=history&amp;feed=atom&amp;title=User%3ACegaiel%2FMacros%2FPopUpCloser%2FCode"/>
	<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/PopUpCloser/Code&amp;action=history"/>
	<updated>2026-06-03T19:08:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/PopUpCloser/Code&amp;diff=148943&amp;oldid=prev</id>
		<title>Cegaiel: Created page with &quot;&lt;pre&gt; ;Pause: Ctrl+P (Resume again with another Ctrl+P) ;Reload script: Ctrl+R     IfWinExist eGenesis Client {  	Gui, +AlwaysOnTop +ToolWindow 	Gui, Font, bold 	Gui, Add, Text, ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/PopUpCloser/Code&amp;diff=148943&amp;oldid=prev"/>
		<updated>2012-02-03T04:34:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; ;Pause: Ctrl+P (Resume again with another Ctrl+P) ;Reload script: Ctrl+R     IfWinExist eGenesis Client {  	Gui, +AlwaysOnTop +ToolWindow 	Gui, Font, bold 	Gui, Add, Text, ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
;Pause: Ctrl+P (Resume again with another Ctrl+P)&lt;br /&gt;
;Reload script: Ctrl+R&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IfWinExist eGenesis Client&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
	Gui, +AlwaysOnTop +ToolWindow&lt;br /&gt;
	Gui, Font, bold&lt;br /&gt;
	Gui, Add, Text, vLocationText, Record the OK button location&lt;br /&gt;
	Gui, Font, norm&lt;br /&gt;
&lt;br /&gt;
	Gui, Add, Text,, &lt;br /&gt;
	( LTrim&lt;br /&gt;
	Click on a tree now and Search for a Falcon Roost&lt;br /&gt;
		&lt;br /&gt;
	When the popup box occurs, then middle click (click mouse wheel) on OK button.&lt;br /&gt;
&lt;br /&gt;
	Make sure you dont click on the black text, just any of the yellowish part of the button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	You can pause the script with Ctrl+P = Pause Script (Ctrl+P again to resume)&lt;br /&gt;
&lt;br /&gt;
	)&lt;br /&gt;
	Gui, Show&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	WinGet, GameWinHandle, ID, eGenesis Client&lt;br /&gt;
	loop&lt;br /&gt;
	{&lt;br /&gt;
&lt;br /&gt;
		WinActivate, eGenesis Client&lt;br /&gt;
		CoordMode, Mouse, Relative&lt;br /&gt;
		KeyWait, MButton, D&lt;br /&gt;
		KeyWait, MButton&lt;br /&gt;
		MouseGetPos, TestX, TestY, WinHandle&lt;br /&gt;
		if (WinHandle = GameWinHandle)&lt;br /&gt;
		{&lt;br /&gt;
			Gosub, RecordIcon&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			Gui, Destroy&lt;br /&gt;
			break&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	RecordIcon:&lt;br /&gt;
	MouseGetPos, LocX, LocY&lt;br /&gt;
	Gui, Destroy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	#Persistent&lt;br /&gt;
	SetTimer, SearchButton, 2000&lt;br /&gt;
	return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SetDefaultMouseSpeed, 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			SearchButton:&lt;br /&gt;
&lt;br /&gt;
			WinActivate, eGenesis Client&lt;br /&gt;
&lt;br /&gt;
;Note the number 15 in the PixelSearch line, below, means look for the color, #EDCFBD within 15 shades.&lt;br /&gt;
;If it is not clicking the popupbox, then try raising it 5 shades at a time (20, 25).&lt;br /&gt;
;If it is mistaking sand in the background, then try lowerering it 1 shade at a time.&lt;br /&gt;
&lt;br /&gt;
			PixelSearch, Px, Py, %LocX%, %LocY%, %LocX%, %LocY%, 0xECDFBD, 15, Fast|RGB&lt;br /&gt;
&lt;br /&gt;
			if ErrorLevel = 0&lt;br /&gt;
			{&lt;br /&gt;
			MouseGetPos, OldMX, OldMY&lt;br /&gt;
			Click, %LocX%, %LocY%&lt;br /&gt;
			Sleep 300&lt;br /&gt;
			MouseMove, %OldMX%, %OldMY%, 0			&lt;br /&gt;
			}&lt;br /&gt;
			return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
^r::reload&lt;br /&gt;
^p::Pause&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cegaiel</name></author>
	</entry>
</feed>