Sign in to follow this  
Followers 0
cherokeee

lock window minimize and run script

4 posts in this topic

Hi there .I figure this is a noob question but i have been searching for over an hour to find the answer and cant.(probley my fault)I have a script that does exactly what i want it to do.No problems there at all. Now that i have that what i need help in doing is this.

I want to be able to run the same script when the window is minimized.My script is totaly beginer but it works.So any help would be greatly apreciated.

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

for $l= 1 to 10000000000

;Attack

If (Pixelgetcolor(273,406) == 0xff9966) Then

Mousemove(279, 407, 0)

MouseClick("left")

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(273,406) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Contimue slaying monsters MIDDLE

If (Pixelgetcolor(306,419) == 0xff9966) Then

Mousemove(306, 419, 0)

MouseClick("left")

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(306,419) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;no no no Double click lead to nothing

If (Pixelgetcolor(371,323) == 0xd4d0c8) Then

Mousemove(371, 323, 0)

MouseClick("left")

sleep(100)

MouseClick("left")

endif

;Knock Down right scroll bar

If (Pixelgetcolor(762,409) == 0xd4d0c8) Then

Mousemove(764, 430, 0)

MouseClick("left")

sleep(1200)

endif

;Knock Down Continue slaying monsters

If (Pixelgetcolor(298,434) == 0xff9966) Then

Mousemove(298, 434, 0)

MouseClick("left")

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(298,434) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Contimue slaying monsters UPPER

If (Pixelgetcolor(305,409) == 0xff9966) Then

Mousemove(305, 409, 0)

MouseClick("left")

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Beast

If (Pixelgetcolor(318,405) == 0xff9966) Then

Mousemove(318, 405, 0)

MouseClick("left")

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(318,405) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Beast Long

If (Pixelgetcolor(295,404) == 0xff9966) Then

Mousemove(295, 404, 0)

MouseClick("left")

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(295,404) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Continue Slaying Monsters After Beast

If (Pixelgetcolor(305,369) == 0xff9966) Then

Mousemove(305, 369, 0)

MouseClick("left")

sleep(1000)

endif

;Vote For Us Today

If (Pixelgetcolor(232,368) == 0xff9966) Then

Mousemove(232, 368, 0)

MouseClick("left")

sleep(6000)

;Top 1

MouseClick("left",132,275)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Top 2

MouseClick("left",216,275)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Top 3

MouseClick("left",304,275)

sleep(7000)

MouseClick("left",507,331)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Top 4

MouseClick("left",392,275)

sleep(7000)

MouseClick("left",510,470)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Top 5

MouseClick("left",478,275)

sleep(7000)

MouseClick("left",515,507)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Top 6

MouseClick("left",555,275)

sleep(7000)

MouseClick("left",463,459)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Top 7

MouseClick("left",641,275)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 1

MouseClick("left",130,340)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 2

MouseClick("left",216,340)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 3

MouseClick("left",304,340)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 4

MouseClick("left",392,340)

sleep(7000)

MouseClick("left",555,408)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 5

MouseClick("left",478,340)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 6

MouseClick("left",555,340)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Middle 7

MouseClick("left",641,340)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

;Bottom 1

MouseClick("left",130,405)

sleep(7000)

MouseClick("left",692,502)

sleep(4000)

send("{ALTDOWN}")

send("{F4}")

send("{ALTUP}")

sleep(4000)

MouseClick("left",371,508)

sleep(4000)

MouseClick("left",338,58)

sleep(4000)

endif

;Attack

If (Pixelgetcolor(294,404) == 0xff9966) Then

Mousemove(294, 404, 0)

MouseClick("left")

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

If (Pixelgetcolor(294,404) == 0xff9966) Then

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

next

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMessage()

MsgBox(4096,"","This is a message.")

EndFunc

Share this post


Link to post
Share on other sites



You cant use PixelGetColor on a minimised window as there is no picture to get colour from.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Hi,

haven't lookes much deeper into your code, but PixelGetColor in minimized mode? I do not think that should work as expected.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0