Sign in to follow this  
Followers 0
cherokeee

Script stop and beep

24 posts in this topic

I have a script that does exactly what i want it to do. But i dont know how to get my compture to beep when the script is stalling out for more then 30 seconds. When the script is running in a game it will constantly run untill a security test come up then the script will just sit there untill i manualy fill in the letters and numbers . What i need is wheen the script just sits there waiting that my comuter will start beeping at me to come fill the damn thing in . More over just for it to beep when the script sit idle for more then 20 seconds. I have hunted in the forum and scrapt but just cant seem to find this. Any help with this tidbit of script would be greatly apreaciated.

Share this post


Link to post
Share on other sites



not a bit !

I get an error as unknown function name

Share this post


Link to post
Share on other sites

That doesnt work at all.

All i want it to do is beep if the script stops looping for more then 10 seconds. Help please

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Ok finialy got the beep to work but not exactly the way i need it to , I know where the problem is but i am not sure how to correct it

If Not WinActive("What exactly do i put in here ?") Then

While 1

Beep(800, 500)

Sleep(50)

Beep(600, 500)

Sleep(50)

WEnd

Endif

I tried putting the gaome in there useing www.eternalwars.com and http://eternalwars.com and help on what i am doing wrong would be apreciated , thanks again

Ps my script loops continualy untill i get a security check then it stops looping waiting for a piquell .

Edited by cherokeee

Share this post


Link to post
Share on other sites

do you understand what a window is. See you give us no data and expect us to read your mind. You tell us you want it to be when your script pauses/goes idle. There are so many ways that your script can pause/go idle. Thus if you want any further help you must try and learn and understand. Now you know when say for example your browsing the internet. And theres a blue bar up top with text saying crap. This happens to be what do you know a title. Example the title of this window is Script stop and beep - Autoit Forums - Mozilla Firefox . Or whatever your internet browser may be. So simply type word for word in between the two ' ' the tile of the window.

Share this post


Link to post
Share on other sites

ok got it . when the windo goes inactive it does stat the beeping . Is there a way when the script stops looping after say 3 or 4 seconds that i can get it to beep ?

Share this post


Link to post
Share on other sites

; <AUT2EXE VERSION: 3.1.1.0>

; ----------------------------------------------------------------------------

; <AUT2EXE INCLUDE-START: C:\Documents and Settings\Butch\Desktop\test folder\EW Clicker.au3>

; ----------------------------------------------------------------------------

Global $Paused

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

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

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

;SoundPlay("C:\Windows\media\tada.wav")

;Opt("MouseClickDownDelay", 250)

for $r = 1 to 10000000000000000

;If WinActive() Then

;beep(100,100)

;Endif

;Attack

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

Mousemove(280, 393, 0)

MouseClick("left")

Mousemove(310, 373, 0)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Contimue slaying monsters MIDDLE

If (Pixelgetcolor(358,386) == 0x009966) Then

Mousemove(310, 373, 0)

MouseClick("left")

Mousemove(280, 393, 0)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

If (Pixelgetcolor(358,386) == 0x009966) Then

sleep(100)

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

If Not WinActive("http://www.eternalwars.com - Eternal Wars! - Mozilla Firefox") Then

While 1

Beep(800, 500)

Sleep(50)

Beep(600, 500)

Sleep(50)

WEnd

Endif

;no no no Double click lead to nothing

If (Pixelgetcolor(370,318) == 0xd4d0c8) Then

Mousemove(369, 323, 0)

MouseClick("left")

sleep(00)

MouseClick("left")

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)

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

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

endif

;Contimue slaying monsters UPPER

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

Mousemove(305, 409, 0)

MouseClick("left")

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

If (Pixelgetcolor(305,409) == 0xff9a63) 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

;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

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

Mousemove(302, 407, 0)

MouseClick("left")

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

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

sleep(300)

If (Pixelgetcolor(302,406) == 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('Hi BCP19 Stop looking for things that are not there LMAO',250,335)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMessage()

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

EndFunc

; ----------------------------------------------------------------------------

; <AUT2EXE INCLUDE-END: C:\Documents and Settings\Butch\Desktop\test folder\EW Clicker.au3>

; ----------------------------------------------------------------------------

Ok here is the script , i know its kinda begginer but what i am trying to do is when it stops looping on the pixels for 3 to 4 seconds that it will then start beeping at me .And sorry about not being more specific.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

; <AUT2EXE VERSION: 3.1.1.0>

; ----------------------------------------------------------------------------

; <AUT2EXE INCLUDE-START: C:\Documents and Settings\Butch\Desktop\test folder\EW Clicker.au3>

; ----------------------------------------------------------------------------

; ----------------------------------------------------------------------------

; <AUT2EXE INCLUDE-END: C:\Documents and Settings\Butch\Desktop\test folder\EW Clicker.au3>

; ----------------------------------------------------------------------------

Ok here is the script , i know its kinda begginer but what i am trying to do is when it stops looping on the pixels for 3 to 4 seconds that it will then start beeping at me .And sorry about not being more specific.

since you decompiled it you betrter ask the person that scripted it or you learn scripting first yourself, but don't expect us to do it for you.

:P

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

What do you mean this is my script i built this from the ground up .

Share this post


Link to post
Share on other sites

Any way in MY script i need help in knowing if there is a way to have it beep at me if it continues it loops looking for a pixel for 4 to 5 seconds. The reason i ask is 1 that when the game goes inactive it takes 10 minutes. 2 when the game sends a test my script just loops waiting for that pixel that wont be there . So what i am wanting to do is when it keeps looping for more then 4 to 5 seconds it will start that anoying beeping at me . Thanks again.

Share this post


Link to post
Share on other sites

Any way in MY script i need help in knowing if there is a way to have it beep at me if it continues it loops looking for a pixel for 4 to 5 seconds. The reason i ask is 1 that when the game goes inactive it takes 10 minutes. 2 when the game sends a test my script just loops waiting for that pixel that wont be there . So what i am wanting to do is when it keeps looping for more then 4 to 5 seconds it will start that anoying beeping at me . Thanks again.

Well Butch, then it should be simple for you to add the Beep() at the correct place .... have fun ... :P


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

wow an endif nightmare... you need , do until, while wend, or for next... what you have written is good i guess for a dos batch... Jdeb do you think Jon would accept the request for an autoit function called end-it-all.... It terminates the script if it gets to out of hand meaning sloppy....:P


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites

It isnt a maater of putting the beep at the right place because it will not beep untill the window stops. O forget it , i will just take the long way and when a test comes up i will have it go to sleep mode then the beeping will begin .

Share this post


Link to post
Share on other sites

Sorry cherokeee

Too much crap.....

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Replace my original code:

If Not WinActive("http://www.eternalwars.com - Eternal Wars! - Mozilla Firefox") Then
    While 1
        Beep(800, 500)
        Sleep(50)
        Beep(600, 500)
        Sleep(50)
    WEnd
Endif
oÝ÷ Ùh­Øb±«­¢+Ø)%9½Ð]¥¹Ñ¥Ù ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÑɹ±ÝÉ̹½´´Ñɹ°]ÉÌÌÌì´5½é¥±±¥É½àÅÕ½Ðì¤Q¡¸(%M±À ÔÀÀÀ¤ìÔͽ¹Ì(%]¡¥±Ä($% À àÀÀ°ÔÀÀ¤($%M±À ÔÀ¤($%   À ØÀÀ°ÔÀÀ¤($%M±À ÔÀ¤(%]¹)¹¥

Is this what you are trying to do?

Edited by dandymcgee

- Dan [Website]

Share this post


Link to post
Share on other sites

Replace my original code:

If Not WinActive("http://www.eternalwars.com - Eternal Wars! - Mozilla Firefox") Then
    While 1
        Beep(800, 500)
        Sleep(50)
        Beep(600, 500)
        Sleep(50)
    WEnd
Endif
oÝ÷ Ùh­Øb±«­¢+Ø)%9½Ð]¥¹Ñ¥Ù ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÑɹ±ÝÉ̹½´´Ñɹ°]ÉÌÌÌì´5½é¥±±¥É½àÅÕ½Ðì¤Q¡¸(%M±À ÔÀÀÀ¤ìÔͽ¹Ì(%]¡¥±Ä($% À àÀÀ°ÔÀÀ¤($%M±À ÔÀ¤($%   À ØÀÀ°ÔÀÀ¤($%M±À ÔÀ¤(%]¹)¹¥

Is this what you are trying to do?

Not realy . What i see that doing is when the window is not active then it waits 5 seconds and starts the beeping. What i am looking for is when the script is looping and can not find a pixel that it is searching for for 5 seconds for it to start that beeping. I know the script is noob , but i am still learning Auto it . The object of the script is to attack a monster then click continue then attck the monster again . A continual loop . The problem i have is they have security tests built in to the game that make a person fill in letters and numbers. SO when this pops up the attack button disapears or the Pixel that the script is finding is not there. So what i want it to to is when it is looping and looking for a pixell and it loops for like 5 seconds it means it is not finding it because i got a security test , then it will start beeping and i can walk in and do the security test and let the script continue on . The script does what it is supposed to do even though it is noob . But the beeping part is what is getting me. It beeps when the window is not active that works very good. But there is 10 minutes between the security test that pops up and the window going inactive . I am looking the beep when the test pops up and the pixel cant be found. If that makes any sence at all.

Share this post


Link to post
Share on other sites

Your trying to go at it the hard way, we are simply producing a script that will be a lot more productive. dandy has made a script put that into a function and then read up on AdlibEnable

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