Jump to content

Add a timer to my macro please


Mazdryk
 Share

Recommended Posts

I posted my macro below.  Basically it checks for a certain color and if it is not there presses a key or goes to the next "else".  I would like to add a timer for the second "else" statement so that after it presses "F1" it wont include that part of the "else" for 25 seconds.  The other problem is that I would like F1 to be available to be pressed for 4 seconds after it meets its requirements but after that 4 seconds totally off for 25.  I will happily send $15 to your paypal if you solve this.

 

#include <Misc.au3>

HotKeySet("{F9}", "_exit")
Hotkeyset ("{1}", "_fight" )

AutoItSetOption( "PixelCoordMode", 1)

$wgh = WinGetHandle("Frog game")
$color1 = "ox400000"

While 1
 Sleep (1000) ;Keeps script running
WEnd

Func _Fight()
   $Black = PixelSearch(828, 920, 828, 920, $color1,100, 1, $wgh)
   $Black2 = PixelSearch(828, 924, 828, 924, $color1,100, 1, $wgh)  
   If (IsArray($Black) = 0 or IsArray($Black2) = 0) Then
   Send ("{F3 DOWN}")
   Sleep (100)
   Send ("{F3 UP}")
   else
   $Black = PixelSearch(860, 920, 860, 920, $color1,100, 1, $wgh)
   $Black2 = PixelSearch(860, 924, 860, 924, $color1,100, 1, $wgh)  
   If (IsArray($Black) = 0 or IsArray($Black2) = 0) Then
   Send ("{F1 DOWN}")
   Sleep (100)
   Send ("{F1 UP}")
   else
   Send ("{2 DOWN}")
   Sleep (100)
   Send ("{2 UP}")

   endif

EndFunc

Func _exit()
Sleep(3000)
    Exit 0
EndFunc

Link to comment
Share on other sites

Welcome decadence!

Deleting posts is generally not acceptable here, once they've been responded to.

It is preferred that you edit and then leave a comment if necessary.

You do have to have a certain post count for editing capability though.

MODERATORS can be appealed to though at need.

@Mazdryk - There is no exception, and you'd know that if you read the rules.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Send me an e-mail Mazdryk on eroguro.nagash@gmail.com

Don't ever do that again please.

If you want to discuss something that is unacceptable here, then we don't want to know about it or have it advertised ... use a PM.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Well, I'm the only one who responded.

True, and in this instance I see no problem, but he needs to know what is general accepted practice.

P.S. I presume that just slipped your mind. I wasn't having a go at you or second guessing.  :)

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Welcome decadence!

Deleting posts is generally not acceptable here, once they've been responded to.

It is preferred that you edit and then leave a comment if necessary.

You do have to have a certain post count for editing capability though.

MODERATORS can be appealed to though at need.

@Mazdryk - There is no exception, and you'd know that if you read the rules.

 

But why do I have the option to delete them, even if my post count is <10? If I shouldn't delete them the Admin's won't give me this right in the first place? And I didn't find anything about deleting posts on the forum rules, is there a more complete version of the rules? And I didn't find anything about exchanging e-mails on the rules as well. And I don't have the option to send PM's, at least I couldn't find them.

Thank you for receiving me on the forums.

Edited by decadence
Link to comment
Share on other sites

You responded openly with an email to help someone who made what is classed as a Game Bot topic/post by the rules.

I don't make the rules, I just obey and help enforce them, by pointing them out to people.

I don't recall the reasoning for allowing Delete, but not Editing until after 10(?) posts.

And I'm not telling you off for that, just making you aware.

PM's may also have a post limit, which also applies to the use of the Chat section.

But personally, in this instance, we don't want you to help anyone with Game Bot related issues ... even by PM.

It was suggested purely because it is then beyond our knowledge, not because we condone it.

It would be in the general rules I suspect, but you no doubt overlooked it.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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