Jump to content
Sign in to follow this  
Shdshdw

Help needed with some codes

Recommended Posts

Shdshdw

Hello, I wanted to make 2 pieces of code but im completely new to scripting.

Maybe when there is an example code I can try to understand it and apply it myself later on.

My first concept is: Creating a loop which presses a certain key once a while and also presses once on a certain pixel when it had changed to a specified colour (and click again when it changed back to that colour)

My second one is: A loop to press a certain button once a while untill a certain pattern of pixels appear in a specified area on the screen in that case the loop should be stopped.

I hope someone is able to make me an example scirpt on one or both of these concepts so I am able to use that technique on more codes.

Thanks in advance :)

Share this post


Link to post
Share on other sites
water

Welcome to AutoIt and the forum!

Could you please explain which program you try to automate? Maybe there is an easier solution than checking pixels.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Shdshdw

Thanks,

Im trying to automate a part of a game. Theres is a button. When you press it a random number will appear 1-20, it should be clicking untill it detects a number higher than for example 14. The problem is it does not seem to have any other detectable output other than the visual pixels. I have already tried to search for these outputs with software like cheatengine.

If it is too hard to check for pixels, just don't waste your time on it, I wouldn't understand a too complex script anyways.

Maybe it is easier to do the first concept?

For the first concept maybe it is possible to be worked out like this:

Press ESCP

wait X seconds

If pixel (x,y) is colour FFFFFF (white) click pixel (x,y) (for example pixel(854,661))

If not FFFFFF continue without clicking

wait X seconds

--------------------------------And repeat again (loop)----------------

Press ESCP

wait X seconds

If pixel (x,y) is colour FFFFFF (white) click pixel (x,y)

If not FFFFFF continue without clicking

wait X seconds

Is that a possiblility or is it just not scriptable?

Edited by Shdshdw

Share this post


Link to post
Share on other sites
water

That's what I feared. You need to read the forum rules first.

Then you will understand that game automation isn't allowed here and you will not get any help on this issue.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Shdshdw

Oh, I didn't know that.

I will quit this subject than, sorry for bothering you,

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×