Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 19:35

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

Advertisement



Need Help

Discussion on Need Help within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2013
Posts: 394
Received Thanks: 27
Need Help

Hallo ich brauch hilfe bei diesem script
es soll lediglich alles einer gewissen zeit die Linke maustaste drücken.

Soweit funktioniert es eigentlich auch, aber es hält die Linke maus taste gedrückt anstatt eines einfachen klicks.

**************************************
Hello i need help for this Script.
ATM it hold down Left click, and i want only a normal click

Code:
#RequireAdmin

HotKeySet("{NUMPAD7}", "_start")
HotKeySet("{NUMPAD9}", "_terminate")

Global $window = "" ; window name

While 1
	Sleep(1000)
WEnd

Func _start()

	If WinExists($window) Then
		WinActivate($window)
		Sleep(1000)

		While 1
		  Sleep(5000)
		  ControlClick($window, "", "", "left")
		  Sleep(10000)
		  #cs
		  MouseClick("left")
		  Sleep(10000)
		  #ce
		WEnd

	Else
		MsgBox(0, "Message", "Window don't exists.");
	EndIf

EndFunc

Func _terminate()
   Exit
EndFunc
Esukho is offline  
Old 09/26/2017, 11:27   #2
 
mhaendler's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 1,826
Received Thanks: 226
Also ich würde anstatt des "Left" immer ein "primary" um Fehler bezüglich Links / Rechts Händer Mäusen auszuschließen

Bei welcher Funktion Funktion "hält" er die Maustaste den gedrückt, bei "ControlClick" oder beim "MouseClick".
mhaendler is offline  
Old 09/26/2017, 15:06   #3
 
elite*gold: 0
Join Date: Mar 2013
Posts: 394
Received Thanks: 27
Mouseclick ist ja blos ein Commentary
sieht man ja durch
#CS und #CE

Es hält bei ControlClick also die taste gedrückt
Esukho is offline  
Old 09/26/2017, 17:12   #4

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
Mouseclick wäre keine option? Also muss der klick im Hintergrund passieren?
Moneypulation is offline  
Old 09/26/2017, 17:13   #5

 
merquart's Avatar
 
elite*gold: 110
The Black Market: 328/0/0
Join Date: Jul 2011
Posts: 4,588
Received Thanks: 626
Code:
ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
titleThe title/hWnd/class of the window to access. See Title special definition.
textThe text of the window to access. See Text special definition.
controlIDThe control to interact with. See Controls.
button[optional] The button to click, "left", "right", "middle", "main", "menu", "primary", "secondary". Default is the left button.
clicks[optional] The number of times to click the mouse. Default is 1.
x[optional] The x position to click within the control. Default is center.
y[optional] The y position to click within the control. Default is center.

Demnach sollte es doch reichen die Anzahl der Klicks einfach mit anzugeben?
Code:
ControlClick($window, "", "", "primary", 1)
merquart is offline  
Old 09/26/2017, 17:47   #6
 
elite*gold: 0
Join Date: Mar 2013
Posts: 394
Received Thanks: 27
Ne ist keine Option, er muss definitiv im Hintergrund geschehen.

ControlClick($window, "", "", "primary","1") hab ich auch probiert, ändert nichts, bleibt genau das selbe problem bestehen.


In meinem Fall soll es in einem Programm einen Button betätigen mit einer Vorgegebenen Zeit mit wiederholungen.

Aber es hält aus irgendeinem Grund die maus gedrückt und lässt diese nicht wieder los.

Vielleicht irre ich mich ja auch gewaltig und das problem liegt wo ganz anders, aber ich kann es anhand eines beispiels zeigen.

Genau so macht sich das problem bemerkbar, er drückt den Button ein, aber lässt nicht los so das die aktion gestartet wird


Ich hab das Problem erkannt und suche jetzt noch nach einer lösung

Ein kleiner Delay zwischen Drücken und loslassen wird gebraucht ^^

Aber für Controlclick gibts keine UP and DOWN option ^^
Esukho is offline  
Old 09/26/2017, 22:40   #7

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
Quote:
Originally Posted by merquart View Post
Code:
ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )
titleThe title/hWnd/class of the window to access. See Title special definition.
textThe text of the window to access. See Text special definition.
controlIDThe control to interact with. See Controls.
button[optional] The button to click, "left", "right", "middle", "main", "menu", "primary", "secondary". Default is the left button.
clicks[optional] The number of times to click the mouse. Default is 1.
x[optional] The x position to click within the control. Default is center.
y[optional] The y position to click within the control. Default is center.

Demnach sollte es doch reichen die Anzahl der Klicks einfach mit anzugeben?
Code:
ControlClick($window, "", "", "primary", 1)
Die default klickanzahl ist 1,daher braucht man die nicht angeben

Quote:
Originally Posted by Esukho View Post
Aber für Controlclick gibts keine UP and DOWN option ^^
Deswegen wundert es mich auch, dass er bei dir die maustaste gedrückt hält. Hast du mal probiert nach dem controlclick etwas per controlsend zu senden? Vielleicht resettet das dein mausklick
Moneypulation is offline  
Old 09/26/2017, 23:02   #8
 
elite*gold: 0
Join Date: Mar 2013
Posts: 394
Received Thanks: 27
Quote:
Originally Posted by Moneypulation View Post
Die default klickanzahl ist 1,daher braucht man die nicht angeben



Deswegen wundert es mich auch, dass er bei dir die maustaste gedrückt hält. Hast du mal probiert nach dem controlclick etwas per controlsend zu senden? Vielleicht resettet das dein mausklick
Hab das problem selber erkannt, es klickt quasi zu schnell und das programm erkennt das loslassen nicht mehr.
Habs mit Einem macro Programm ausgetestet und da gings auch erst wenn ich einen 0,5 sec Delay zwischen druck und loslassen einfüge
Aber ich sehe selbst grad keine Möglichkeit ein Delay zwischen Klick und loslassen zu machen in form von
ControlClick

Jemand ne lösung ?
Esukho is offline  
Old 09/27/2017, 14:13   #9


 
Lawliet's Avatar
 
elite*gold: 2
Join Date: Jul 2009
Posts: 14,456
Received Thanks: 4,685
Versuchs mal mit _SendMessage

PHP Code:
#include <SendMessage.au3>
#include <WindowsConstants.au3>
_SendMessage($hWndControl$WM_LBUTTONDOWN)

Sleep(500)

_SendMessage($hWndControl$WM_LBUTTONUP
Ich glaube ControlClick funktioniert genauso.
Mit ControlGetHandle bekommst du das Handle
Lawliet is offline  
Reply


Similar Threads Similar Threads
[HELP]HELP HELP HELP[HELP]
09/23/2013 - Facebook - 3 Replies
GUYS ^^ THIS IS A HELP THREAD NOT REQUEST THREAD BUT YOU CAN CONSIDER IT AS REQUEST THREAD DOES ANYONE OF YOU KNOW THE AUTO SUBMIT PHP CODE? THANKS!
help help help help help help
06/28/2009 - Say Hello - 0 Replies
how i can dowmload Mangos 6385 ??????????????????????????????????? please give me the limk i can't see that i know it is in www.elitepvpers.com/.../153716-release-mangos-relea ses-blackscorpian-win32-2-4-3-a.html - but give me link sent it to my email plz



All times are GMT +1. The time now is 19:35.


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