Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 22:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Pixel search and mouseclick - c#

Discussion on Pixel search and mouseclick - c# within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
Pixel search and mouseclick - c#

How i want to use AutoitX.dll in c# for to make a pixelbot with c# but with some function of autoit like PixelSearch and Mouseclick. Is this possible? if yes, what i must write in the code of c# source?
fuso98 is offline  
Old 06/21/2013, 15:54   #2
 
elite*gold: 0
Join Date: Jan 2010
Posts: 507
Received Thanks: 203
I dont know of c# but in AutoIt is it like this :
Code:
$resultxy = PixelSearch(0, 0 , 20, 300, 0x343434)
If Not @error Then
	MouseClick("Left", $resultxy[0], $resultxy[1])
EndIf
Shishidump is offline  
Old 06/21/2013, 16:00   #3

 
Futur94's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 263
Received Thanks: 177
Code:
HotKeySet("{F6}","_Exit")

While 1
      $Variable=PixelSearch(left,top,right,bottom,color)
      If IsArray($Variable) = True Then
         MouseMove($Variable [0], $Variable [1],1)
         MouseClick ("left")
      EndIf
WEnd

Func _Exit()
      Exit
EndFunc
MFG, Futur94
Futur94 is offline  
Old 06/21/2013, 18:13   #4
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
Quote:
Originally Posted by Shishidump View Post
I dont know of c# but in AutoIt is it like this :
Code:
$resultxy = PixelSearch(0, 0 , 20, 300, 0x343434)
If Not @error Then
	MouseClick("Left", $resultxy[0], $resultxy[1])
EndIf

Quote:
Originally Posted by Futur94 View Post
Code:
HotKeySet("{F6}","_Exit")

While 1
      $Variable=PixelSearch(left,top,right,bottom,color)
      If IsArray($Variable) = True Then
         MouseMove($Variable [0], $Variable [1],1)
         MouseClick ("left")
      EndIf
WEnd

Func _Exit()
      Exit
EndFunc
MFG, Futur94


@fuso98 : import that .dll in c# and greate a namespace for it
YatoDev is offline  
Thanks
1 User
Old 06/23/2013, 03:12   #5


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
Add the dll as reference in your project.
Then you need to declare a variable, for the autoit object:
Code:
public AutoItX3 a = new AutoItX3;
You can use it in your script on that way:
Code:
a.PixelSearch(....)
Requi is offline  
Thanks
1 User
Old 06/27/2013, 10:12   #6
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
thank's to fluttershy and requi
fuso98 is offline  
Old 06/27/2013, 10:17   #7


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
Quote:
Originally Posted by fuso98 View Post
thank's to fluttershy and requi
No plan.
But you can't use all functions from autoit
Requi is offline  
Old 06/27/2013, 10:25   #8
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
yes i know it xD i only whant to use some function that in c# there's not
fuso98 is offline  
Old 06/27/2013, 10:30   #9


 
Requi's Avatar
 
elite*gold: 3570
The Black Market: 244/0/0
Join Date: Dec 2012
Posts: 13,044
Received Thanks: 8,252
You can do everything as I know.
You just need to write that function yourself.
Requi is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Search pixel bot
04/16/2013 - DarkOrbit - 4 Replies
Hi i search a pixel bot who can collect palla and kill alien plz or just collect
Pixel Search
05/07/2012 - AutoIt - 1 Replies
Hey, mit welchen Programm bekomme ich nochmal diese Werte her? PixelSearch(12, 174, 1028, 700, 0x59571A, 10) Danke
help with pixel search
08/08/2011 - AutoIt - 3 Replies
I need to implement in my autoit bot some changes and i am gonna use pixel search. What i exactly want is a script that start pressing a buton then compare a pixel if this pixel is grey make script 1 until pixel is not grey , when the pixel became not grey make script 2 till its finished, and when script 2 finish has to go to the compare pixel spot for starting again with script 1 till is not grey to make script 2 ...... and so on indefinitly it would be something like this?
Mouseclick auf gefundes Pixel
06/27/2011 - AutoIt - 7 Replies
Hi Leute. Ich habe dieses Scrit. Es soll in dem Online Spiel Last Chaos in einem bestimmt Bereich den roten Pixel finden und auf den gefunden Pixel Linksklicken. Aber wenn er es findet moved er die Maus nur oben ganz links zum Bildschirm. (Last Chaos Prozess ist die NKSP.) WinWaitActive("") WinWaitActive("") $x1=0 $y1=0 HotKeySet("{numpad2}","Starten&quo t;) HotKeySet("{Numpad3}","Beenden&quo t;)
Pixel search
02/23/2008 - Guild Wars - 18 Replies
hallihallo bin immoment dabei einen meiner eigenen bots zu optimieren und wollte ne Pixelsearchfunktion einbauen. Leider weiß ich nicht genau wie man das macht vorallem mit den farben. mein ziel: 3 verschiedene punkte im gw fenster(mit: x1;y1;;x2;y2;;x3;y3) sollen geprüft werden ob sie in GRÜN sind. falls x1;y1 grün ist -> (dollerzeichen)folge = 1 falls x2;y2 grün ist -> (dollerzeichen)folge = 2 falls x3;y3 grün ist -> (dollerzeichen)folge = 3



All times are GMT +1. The time now is 22:21.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.