Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 21:50

  • 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   #1
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
Question Control Click

Hey Com^^,

ich will spaßhalber etwas mit hidden herumspielen^^
bei Conrtrolclick jedoch nimmt autoit nicht die controlclick coords von window info sonder nur die normalen, wodurch des ganze net hidden gehn will^^

würde gerne wissen, wie man autoit praktisch ein fenster zuweist, in dem es klicken soll und es die coords nimmt , als wäre dieses fenster der gesamte bildschirm...

wenn jmd weis wie ich klicks anders hidden simulieren kann, kann ers auch schreibn^^

€ der controlclick funzt bei normalen mozilla mit den controlclickcoords, aber net, wenn ich spiel(runescape ) habe, dann nimmt autoit die coords als normale coords...
rexfox is offline  
Old 10/13/2010, 00:17   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
machs mit WinGetPos ( "title" [, "text"] )
und control klick geht hidden

bsp script aus der autoit hilfe:


Quote:
$size = WinGetPos("[active]")
MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3])
ich sag dir gleich wie das mit der anwendung koordinaten lesen geht mom
maxi39 is offline  
Thanks
1 User
Old 10/13/2010, 00:37   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
hier die lösung an meinen beispiel:




PHP Code:
HotKeySet("{F1}","_a")

While 
1

    Sleep
(200)

WEnd


Func _a
()

    While 
1
$size 
WinGetPos("[active]")
$NMSG=GUIGETMSG()
$POS=MOUSEGETPOS()
$Size1 $Size[0]
$Size2 $Size[1]

TOOLTIP(($POS[0]-$Size1)&" / "&($POS[1]-$Size2))


WEnd

EndFunc 

du muss halt für die koordinaten im control klick nur das angeben
:

PHP Code:
$size WinGetPos("[active]")
$NMSG=GUIGETMSG()
$POS=MOUSEGETPOS()
$Size1 $Size[0]
$Size2 $Size[1]

$controlklickkoordinate1 $POS[0]-$Size1
$controlklickkoordinate2 
$POS[1]-$Size2 
press thx wenn ich geholfen hab ;D
maxi39 is offline  
Thanks
1 User
Old 10/13/2010, 00:46   #4
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
Erstma thx^^ aber ich glaube mein problem ist ein anderes..
also mein problem ist ,dass er die coords bei dem spiel runescape falsch nimmt
teste aber mal ob es geht mit deinem echt coolen tool^^


€runescape will net des will einfach net die control click coords als control click coord nehmen sondern nimmt die immer als normale bildschirm coords

metin2 geht anscheinend auch net ,weil autoit window info mir noch nichtmal ClassnameNN sagen kann und auch keine controlclick coords gibt..
rexfox is offline  
Old 10/13/2010, 00:49   #5
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by rexfox View Post
Erstma thx^^ aber ich glaube mein problem ist ein anderes..
also mein problem ist ,dass er die coords bei dem spiel runescape falsch nimmt
teste aber mal ob es geht mit deinem echt coolen tool^^
du muss halt noch den titel von rune scape angeben
bei WinGetPos ( ) , ich hab jetzt [active] drin d.h er sucht die koordinaten von jedem beliebigen aktiven fenster
maxi39 is offline  
Thanks
1 User
Old 10/13/2010, 01:06   #6
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
Runescape wird praktisch net direkt als fenster erkannt von controlclick und deshalb klickt der da auch net rein.. kp aber großes thx für die mühe werde auch gleich mal auf den thx button klickn^^
rexfox is offline  
Thanks
1 User
Old 10/13/2010, 01:13   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by rexfox View Post
Runescape wird praktisch net direkt als fenster erkannt von controlclick und deshalb klickt der da auch net rein.. kp aber großes thx für die mühe werde auch gleich mal auf den thx button klickn^^
ich werd ma gucken, wenn ich was raus gefunden habe pn ich dich direkt^^
was willst du eig mit control klick erreichen?
maxi39 is offline  
Thanks
1 User
Old 10/13/2010, 01:17   #8
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
ich werde, um autoit kennenzulernen einen kleinen runescapebot schreibn^^ wie der aussehen wird muss ich noch guckn^^
im moment wollte ich damit im inventar von runescape einen gegnstand anklickn, sodass er angezogen wird ....so zum testen


€ wenn du zur lösung infos über runescape brauchst dann sag welche^^
rexfox is offline  
Old 10/13/2010, 13:14   #9
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
in manchen spielen ist es notwendig, die maus vorher an den gewünschten ort zu setzen...
hab mir deshalb vor längerer zeit mal eine clickfunktion geschrieben, die das auch mit berücksichtigt:
Code:
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
für die relativen coors nimmt man natürlich einfach die WinGetPos funktion und rechnet so immer relativ zur position des fensters
lolkop is offline  
Old 10/13/2010, 15:32   #10
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
repost, hatte in meinen alten fehler drin, deswegen gelöscht -_-




PHP Code:
#RequireAdmin
#include <Mouseklick.au3>
HotKeySet("{F1}","_a")

HotKeySet("{F2}","_b")


While 
1

    Sleep
(200)

WEnd


Func _a
()

    While 
1
$size 
WinGetPos("[active]")
$NMSG=GUIGETMSG()
$POS=MOUSEGETPOS()
$Size1 $Size[0]
$Size2 $Size[1]

TOOLTIP(($POS[0]-$Size1)&" / "&($POS[1]-$Size2))


WEnd

EndFunc




Func _b
()

$size WinGetPos("METIN2")
$Size1 $Size[0]
$Size2 $Size[1]
$NMSG=GUIGETMSG()
$POS=MOUSEGETPOS()
$controlklickkoordinate1 $Size1
$controlklickkoordinate2 
$Size2


TOOLTIP
(($POS[0]-$Size1)&" / "&($POS[1]-$Size2))


MouseMove537 $controlklickkoordinate1  512 $controlklickkoordinate2 )

_mouseclickplus"METIN2","LEFT",537 $controlklickkoordinate1  512 $controlklickkoordinate2 ) ; ersetzt controlclick






EndFunc 

so müsste es gehen



UDF :
maxi39 is offline  
Old 10/13/2010, 16:51   #11
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
Wieder ein großes Danke an euch^^ die leute sind hier viel hilfsbereiter als in der metin2 section





Quote:
Func Click($title, $btn, $xpos, $ypos, $clicks = 1)
Local $hwnd = ControlGetHandle($title, "", "")
Local $pos = BitOR($ypos * 0x10000, BitAND($xpos, 0xFFFF)) <--KP
Switch $btn
Case "left"
For $i=1 To $clicks
DllCall("User32.dll", "int", "PostMessage", "hwnd", $hwnd, "int", 0x200, "int", 0, "long", $pos)<-- DLL AUCH KP
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



also an lolkop^^
ich kenne das mit dem bit noch nicht und mit Dlls hab ich noch nie gearbeitet^^ könntest du mir den script etwas genauer erklären bzw sagen wie ich mit dem weiterarbeiten kann ?
rexfox is offline  
Old 10/13/2010, 17:02   #12
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
is doch schon fertig die funktion...
zur nutzung einfach Click(<Fenster Titel>, <left>/<right>, <x coordinate>, <y coordinate>, <anzahl der clicks>)
lolkop is offline  
Old 10/13/2010, 17:12   #13
 
elite*gold: 0
Join Date: Apr 2009
Posts: 85
Received Thanks: 7
ich mein weil bei mir passiert da nix^^ ist des des gleiche wie die udf von maxi? also auch was ,was ich includen muss? und maxi mit deinem script komme ich auch nicht klar ^^ kannste da mal sagn wie mit dem umzugehen ist?
wenn ich nerve votet einfach für close
rexfox is offline  
Old 10/13/2010, 18:21   #14
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
ähm das von lolkop : setzt das in ein autoit script. abspeichern . und pack des in dein include ordner.

zum schluss bei deinem script #include <lolkopsscript.au3> oben
dann kannste seine funkt anwenden :

Click(<Fenster Titel>, <left>/<right>, <x coordinate>, <y coordinate>, <anzahl der clicks>)
maxi39 is offline  
Old 10/13/2010, 18:25   #15
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
du kannst die funktion auch einfach ins script kopiern -.-
lolkop 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 21:50.


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.