Jump to content

Recommended Posts

Posted

this is my first post, so before we going any further I need to let you that I'm a beginner to creating a script so that I might not be able to understand straight away so please take time with me and you will need to example me in more detail if you can please, so now let me introduce you to what I'm trying to do here is that I'm try to do the auto pressing key in different colour but I don't know to to make it read correctly and do I do any wrong or I could do a different way please let me know

WW20220112160855_11.jpg.23be682bb63c1d2f6d67a33a3f7436f7.jpg

WG20220112160936_11.jpg.c49bc5d6bb40135b15d41d36a4161b14.jpg

in this pic you can tell that there are different colour on the W 

Func w() ; White
    if PixelGetColor(905, 119) = 0xECEDF0 then  ;Top middle
    sleep(10)
    if PixelGetColor(896, 119) = 0xECEDF0 then ;Top left
    sleep(10)
    if PixelGetColor(910, 132) = 0xECEDF0 then ;Down right
    sleep(10)
    if PixelGetColor(900, 131) = 0xECEDF0 then ;Down left
    sleep(10)
    send("{w down}")
    sleep(100)
    send("{w up}")

Func w() ; Green
    if PixelGetColor(905, 119) = 0x008000 then  ; Top middle
    sleep(10)
    if PixelGetColor(896, 119) = 0x008000 then ; Top left
    sleep(10)
    if PixelGetColor(910, 132) = 0x008000 then ; Down right
    sleep(10)
    if PixelGetColor(900, 131) = 0x008000 then ; Down left
    sleep(10)
    send("{w down}")
    sleep(100)
    send("{w up}")

I has use this to selected the key in different colour but it still doesn't pick up the colour or the key and do nothing

thanks a lot

sorry for my bad writing

Posted

Hello @Nong.  Welcome to the forum. 

 

Unfortunately, it looks like what you are trying to script is for a game.  Game automation discussion and support is not allowed on the forum and this post will likely be locked; sorry.

Please refer to the forum rules.  Also, take note of rule #7 (not making a new topic/post by rewording a locked topic).

  • Moderators
Posted

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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