Register for your free account! | Forgot your password?

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

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

Advertisement



Control Click

Discussion on Control Click within the AutoIt forum part of the Coders Den category.

Reply
 
Old 10/13/2010, 18:41   #16
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
also lolkop , wenn ichs richtig verstehe muss ich deinen script includen, dann die variablen deklarieren und dein click aufrufen.. bei mir sieht das so aus

Code:
#include <lolkopscript.au3>
$title=WinGetTitle("Metin2")
WinGetPos($title)
$xpos=$xpos[0]
$ypos=$ypos[1]
$btn="left"
Click($title, $btn, $xpos, $ypos, $clicks = 1)
rexfox is offline  
Old 10/13/2010, 18:53   #17
 
| Moep |'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,079
Received Thanks: 438
Er hat dir eine fertige Funktion gepostet, die du nur in dein Script kopieren musst und dann mit den entsprechenden Parametern aufrufen kannst. Wenn du dass nicht verstehst, dann #VOTE 4 CLOSE
| Moep | is offline  
Old 10/13/2010, 18:58   #18
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
da ich nicht weis, ob du auchnoch controls nutzen musst bei deinem spiel, kannste dir die funktion ja noch etwas erweitern...

Code:
Func Click($title, $control, $btn, $xpos, $ypos, $clicks = 1)
	Local $user32 = DllOpen("User32.dll")
	Local $i, $hwnd = ControlGetHandle($title, "", $control)
	Local $pos = BitOR($ypos * 0x10000, BitAND($xpos, 0xFFFF))
	Switch $btn
		Case "left"
			For $i=1 To $clicks
				DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", 0x200, "int", 0, "long", $pos)
				DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", 0x201, "int", 0x1, "long", $pos)
				DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", 0x202, "int", 0x1, "long", $pos)
			Next
		Case "right"
			For $i=1 To $clicks
				DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", 0x200, "int", 0, "long", $pos)
				DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", 0x204, "int", 0x2, "long", $pos)
				DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", 0x205, "int", 0x2, "long", $pos)
			Next
	EndSwitch
	DllClose($user32)
EndFunc
die coordinaten sind relativ zum verwendeten control zu wählen...

hier mal ein beispiel mit einem selbst erstellten gui. der button wird vom windowinfo tool als "Button1" angezeigt. als coors können wir in diesem falle ja einfach 0,0 oder 1,1 wählen, da wir einfach nur irgendeinen punkt vom button anklicken müssen. als anzahl der klicks habe ich mal 2 gewählt, falls aus irgend einem grund ein klick nicht ankommen sollte.
lolkop is offline  
Old 10/13/2010, 19:33   #19
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
also mein script ist jetzt so:
Code:
Click("METIN2", "right", 1403, 355, 1)

Func Click($title, $btn, $xpos, $ypos, $clicks = 1)
    Local $hwnd = ControlGetHandle($title, "", "")
    Local $pos = BitOR($ypos * 0x10000, BitAND($xpos, 0xFFFF))
    Switch $btn
        Case "left"
            For $i=1 To $clicks
                DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x200, "int", 0, "long", $pos)
                DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x201, "int", 0x1, "long", $pos)
                DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x202, "int", 0x1, "long", $pos)
            Next
        Case "right"
            For $i=1 To $clicks
                DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x200, "int", 0, "long", $pos)
                DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x204, "int", 0x2, "long", $pos)
                DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x205, "int", 0x2, "long", $pos)
            Next
    EndSwitch
EndFunc

jedoch klickt er immer noch nicht in das fenster METIN2
hab mit tool von maxi die coords genommen und alles eingefügt.. trotzdem klickt er im fenster METIN2 nicht an die gewünschte stelle^^

und @lolkop des mit dem gui geht auch mit normalen controlclick des hab ich schon hinbekommen^^ nur METIN2 hat keine control und der fenstername scheint net auszureichn als info

€ hatte fehler im script jetzt richtig pls guckt ob was falsch ist oder euch was einfällt ,was das problem sein könnte
rexfox is offline  
Old 10/13/2010, 19:44   #20
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by rexfox View Post
und @lolkop des mit dem gui geht auch mit normalen controlclick des hab ich schon hinbekommen^^ nur METIN2 hat keine control und der fenstername scheint net auszureichn als info
was glaubst du denn wie controlclick funktioniert -.-

die funktion die ich gepostet habe ist nur eine verbesserung in ganz vielen sachen von controlclick.

und das geht ganz sicher... lass dir dochmal alle controls auflisten, und teste dann jedes einzelne durch...
lolkop is offline  
Old 10/13/2010, 19:57   #21
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
autoitwindow info gibt mir keine control.. gar keine hab im tab "Control" geguckt gibt nix an-.-
und es funzt net XD
weis net vllt hat metin irgendeinen schutz drin.. weis net wer hier noch metin zoggt^^
der könnte vllt mal guckn obs bei ihm genauso ist
rexfox is offline  
Reply


Similar Threads Similar Threads
Control click
04/29/2012 - AutoIt - 9 Replies
#Removed
Control Center for Admin Easy to Control all
10/16/2009 - MapleStory - 2 Replies
Credits go to ucyc for making this nice programm http://www.pictureupload.de/originals/pictures/15 1009164127_2.jpg http://www.pictureupload.de/originals/pictures/15 1009164303_3.jpg Download Click here
ELSE without control click.
10/23/2008 - Conquer Online 2 - 1 Replies
Hi. I never used ELSE before the newest patch which means it has to use ur mouse now. I used it once actually and i remember it didnt use ur mouse, but it kept dragging conquer as the focus window. What good is this if you cant use your computer if it keeps coming up every second as conquer? Anyway, i had this theory, what if he can make the same bot he had (the one that doesnt use the mouse) except remove the part that holds control, so its just mouse clicks without using the mouse. And...
Awesome bug, you can control lots of chars with a click
08/20/2007 - WoW Exploits, Hacks, Tools & Macros - 8 Replies
So i have just some questions about a strange thing i saw today.. I was playing in private server (funserver) 2.1.0 when i saw a strange fire effect coming from 8-9 mages that were in the same position, so i was like aha noobs they all made a mage and they made a aoe fire skill in the same position to look cool but then something strange happened. When the first of them moved, the other moved exactly the same, all of them at the same time, the same way. They (he) came with me and my party to...



All times are GMT +2. The time now is 20:32.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.