Sign in to follow this  
Followers 0
bboyspook

Help with pixel and mouse clicking?

3 posts in this topic

Ok I was wondering exactly what coding would be needed to search for a certain color in game and have your mouse right click it and drag it to another spot. I am familiar with the code getpixelcolor and the mousecord 1's. but can someone type me an example of how the script should look? Im still pretty new at this, and am trying to learn :) Thank you :)

Share this post


Link to post
Share on other sites



Ok I was wondering exactly what coding would be needed to search for a certain color in game and have your mouse right click it and drag it to another spot. I am familiar with the code getpixelcolor and the mousecord 1's. but can someone type me an example of how the script should look? Im still pretty new at this, and am trying to learn :) Thank you :)

Try playing with the examples in the help file. (It's PixelGetColor BTW not getpixelcolor.)

Also search the folrums for examples. You can search for topics which include more than one word using the advnced search and searching for

+word1+word2

for example.

Welcome to the forums o:)

dragging a colour from one position to another is not really do-able. But just for a joke here's a script that lets you drag a few pixels of the screen from one place to another.

#include <misc.au3>
#include <GUICOnstantsEx.au3>
#include <windowsconstants.au3>
HotKeySet("{ESC}","quit")
$size = 5;how big the square on screen to be dragged away is each time
 while 1
     if _IsPressed("01") Then
         $mp = mousegetpos()
         
         $col = PixelGetColor($mp[0],$mp[1])
         $hole = GUICreate("",$size,$size,$mp[0],$mp[1],$WS_POPUP)
         GUISetState()
          GUISetBkColor(0,$hole)
         winsetontop ($hole,"",1)
         $g = GUICreate("",$size,$size,$mp[0],$mp[1],$WS_POPUP)
         
         GUISetBkColor($col,$g)
         GUISetState()
         winsetontop ($g,"",1)
         while _IsPressed("01")
            $mp = mousegetpos() 
            winmove($g,"",$mp[0],$mp[1])
        WEnd
    EndIf
    
    sleep(40)
    
WEnd

func quit()
    Exit
EndFunc

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Lol um. Well the thing I was trying to do was make a code for the game I play. To run a script to help me auto heal. I already have the HP and CHi/Mana/Mp healer, where it looks at the hp/chi/mana bar and when it gets to a certain point it presses the heal button. Its just I wanted when my hp pills are gone (which i know how to add that part in script with the if command and the pixelgetcolor = black hex code. ) I wanted my hp pills to be brought up from the inventory and the mouse to search through the invcentory and find the pill color. right click and drag them back to where the pills are suppose to go. Is there a way to do that? So basically...

I just want a script to heal my chi and hp. As soon as the pills are empty to press "I" and sift through my inventory for the same pixel color as the pills on my hot bar on the bottom right, right click it and drag back to where the previous pills are.

Edited by bboyspook

Share this post


Link to post
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
Sign in to follow this  
Followers 0