need help

Ask gaming related questions (AHK v1.1 and older)
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

need help

15 May 2021, 20:09

Code: Select all

wTitle = MEmu
Loop {
 WinWait, %wTitle%
 SetTimer, MEmu, 450

 WinWaitClose
 SetTimer, MEmu, Off

}
Memu:

PixelSearch,,, 327, 61, 327, 61, 0x840c1a, 100
If !ErrorLevel ; Skip if pixel was found
 Return
SetKeyDelay, 450
ControlSend,, {F2 2}, %wTitle%
Return

esc::exitapp
F6::Pause ; press F1 to play/pause
Last edited by gregster on 15 May 2021, 20:18, edited 1 time in total.
Reason: [code] tags added, again. Please use them yourself, next time. Thank you!
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

Re: need help

15 May 2021, 20:11

im using 3 scripts like this one i posted its possible to mix 3 in one 3 colors 3 coords so i don't need keep opening 3 files all the time ill hep me a bit thx guys
User avatar
mikeyww
Posts: 26890
Joined: 09 Sep 2014, 18:38

Re: need help

15 May 2021, 21:09

After the PixelSearch, you could do

Code: Select all

If ErrorLevel
 PixelSearch.....
to initiate another search.
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

Re: need help

16 May 2021, 03:11

Code: Select all

wTitle = MEmu
Loop {
 WinWait, %wTitle%
 SetTimer, MEmu, 450

 WinWaitClose
 SetTimer, MEmu, Off

}
Memu:
PixelSearch,,, 327, 61, 327, 61, 0x840c1a, 100
If !ErrorLevel ; Skip if pixel was found
SetKeyDelay, 1000
ControlSend,, {F2 2}, %wTitle%
}
Memu:
PixelSearch,,, 327, 61, 327, 61, 0x840c1a, 100
If !ErrorLevel ; Skip if pixel was found
SetKeyDelay, 1000
ControlSend,, {F2 2}, %wTitle
}
Memu:
PixelSearch,,, 327, 61, 327, 61, 0x840c1a, 100
If !ErrorLevel ; Skip if pixel was found
 Return
SetKeyDelay, 1000
ControlSend,, {F2 2}, %wTitle%
Return

esc::exitapp
F5::Pause ; press F5 to play/pause
Last edited by gregster on 16 May 2021, 04:57, edited 1 time in total.
Reason: [code] tags added, again. Please use them yourself, next time. Thank you!
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

Re: need help

16 May 2021, 03:13

i tried that but im a nab
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: need help

16 May 2021, 05:23

vitorcastro wrote:
16 May 2021, 03:13
i tried that but im a nab
Are you referring to the script above or to my repeated (yet unsuccessful) requests to use code tags ? Unfortunately, you didn't read my personal message either.

To get a code box like this

Code: Select all

var := "hello"
MsgBox % var
you just put [code][/code] around your code. Like this (in the editor):

code tags.png
code tags.png (3.52 KiB) Viewed 367 times

You could type out these tags, but the 'full editor' of the forum also provides you with a button for this. Just select your code and then click the fifth button from the left, at the top of the editor. Depending on your forum theme, it can look differently, but it wll always be at the same position:

In the 'Simplicity' theme, it's quite evident which button to use:

Code tags button simplicity.png
Code tags button simplicity.png (5.43 KiB) Viewed 367 times

With the 'Digi' theme it looks like this ('prosilver' looks similar):

code tags button digi.png
code tags button digi.png (8.99 KiB) Viewed 367 times

Are there any open questions left :?: Then feel free to answer the PM I sent you (or ask here).

No questions? Fine, then we are looking forward to a lot of fine code boxes, created by you! :thumbup:
By using them, you'll keep the forums tidy - and it will help your supporters to answer your questions. Thank you!
User avatar
mikeyww
Posts: 26890
Joined: 09 Sep 2014, 18:38

Re: need help

16 May 2021, 07:08

Although you could do this in a loop, the following idea could also work for a few searches.

Code: Select all

PixelSearch....
If ErrorLevel {
 PixelSearch.....
 If ErrorLevel
  PixelSearch....
}
If ErrorLevel
 Return
Color was found.
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

Re: need help

16 May 2021, 09:55

gregster wrote:
16 May 2021, 05:23
Are there any open questions left :?: Then feel free to answer the PM I sent you (or ask here).

No questions? Fine, then we are looking forward to a lot of fine code boxes, created by you! :thumbup:
By using them, you'll keep the forums tidy - and it will help your supporters to answer your questions. Thank you!
sorry my my english is bad im from brazil idk what you talking about
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

Re: need help

16 May 2021, 09:59

please man fix the script for me? im bad in english and scripts please no beeps xD
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: need help

16 May 2021, 10:27

vitorcastro wrote:
16 May 2021, 09:55
gregster wrote:
16 May 2021, 05:23
Are there any open questions left :?: Then feel free to answer the PM I sent you (or ask here).

No questions? Fine, then we are looking forward to a lot of fine code boxes, created by you! :thumbup:
By using them, you'll keep the forums tidy - and it will help your supporters to answer your questions. Thank you!
sorry my my english is bad im from brazil idk what you talking about
That's why I made some nice pictures for you. Come on, you want others to work for you and you don't even try?

Like I said, if you have questions - please ask! Please have another look at the pictures, and try it next time.
It's very easy - you would be the first forum member who doesn't get it.

If you don't try, I will remind you every time.

PS: also feel free to ask in the portuguese language forum for some help on using code tags.
vitorcastro
Posts: 47
Joined: 18 Apr 2021, 19:09

Re: need help

16 May 2021, 10:36

ok i got it now i need click on code before post?
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: need help

16 May 2021, 10:39

vitorcastro wrote:
16 May 2021, 10:36
ok i got it now i need click on code before post?
before inserting code into your post, yes. Then put the code (and only the code) between the code tags.

You can click here and see how it looks in the editor: https://www.autohotkey.com/boards/posting.php?mode=edit&f=18&p=399940

(Alternatively, insert the code first, then select the code, and finally push the button.)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 110 guests