Jump to content

Script stop and beep


 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • Developers

; <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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Link to comment
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?

Edited by dandymcgee

- Dan [Website]

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...