Register for your free account! | Forgot your password?

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

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

Advertisement



Trying to loop a mouseclicks until

Discussion on Trying to loop a mouseclicks until within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2014
Posts: 73
Received Thanks: 8
Trying to loop a mouseclicks until

So basicly im trying to make a autoclicker, just a small starter project :/
But when i try to do the $Var = $Var + 1 it errors and exits..

Here's some of my code

Code:
Global $i = 0

Func etinputfunc()
   Do
	  Mouseclick("Left")
	  Sleep($Input1)
	  $i = $i + 1
   Until $i = 10000
EndFunc
The Error:
"C:\Users\ChristianPC\Dropbox\My Autoclicker\GUI ting.au3" (47) : ==> Variable used without being declared.:
$i = $i + 1
$i = ^ ERROR
>Exit code: 1 Time: 1.105


If someone has an idea of what i need to do, please help me
- Thanks
Gundogan is offline  
Old 03/25/2015, 18:42   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
You maybe call the function before the variable is initialized. Also I assume that you have a Control-ID inside $Input1, so if you want to read the value of that Input-Controls use GUICtrlRead($Input1)
alpines is offline  
Old 03/25/2015, 20:54   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,234
Received Thanks: 1,095
Code:
Global $i = 0,$Input1 ; forgot to define the input

;#example
;Case $_Button ; just a button event to call function
         $ = 0
         etinputfunc()
;#

Func etinputfunc()
   Do
	  Mouseclick("Left")
	  Sleep(GUICtrlRead($Input1)) ;you must use GUICTRLREAD to get value of input from gui. or otherwise
                                                  ;you must set a value to your $Input1 variable like $Input = 1000
	  ;$i = $i + 1 ; you can do this a differnt way too
          $i += 1 ;this is the other shorter/quicker way..
   Until $i = 10000
EndFunc
have fun :_)
fear-x is offline  
Reply

Tags
autoclicker, autoit, coding, loop


Similar Threads Similar Threads
Mouseclicks via Post-/Sendmessage?
03/06/2014 - .NET Languages - 6 Replies
Hiho, ich wollte mal fragen ob es überhaupt möglich ist mit Post- oder Sendmessage einen Mausklick zu simulieren. Also laut Google soll es ja anscheind funktionieren, jedoch bei meinem Code nicht so ganz ._.". Das Senden von Tastendrücken hab ich auch probiert und das funktioniert einwandfrei, es ist lediglich das Senden von Mausklicks. Hier die Codeschnipsel: public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
MouseClicks an ein inactives nicht minimiziertes Fenster schicken !
09/10/2013 - AutoIt - 2 Replies
Hallo, ich habe ein kleines Problem bei meinem Programm. Ich will mit ControlClicks das Programm ansteuern(es ist eine MacromediaFlashPlayerActiveX1 Anwendung). Jedoch funktionnieren die ControlClicks nur wenn ich vorher das Fenster einmal selbst angeklickt habe, auch wenn ich es durch einen Befehl wie ControlFocus oder WinActivate nach vorne bringe, funktionniert das ControlClick trotzdem nicht. Nur wenn ich es wirklich selbst einmal anklicke. Weiss jemand eine Möglichkeit wie ich...
C# Simulated Mouseclicks
10/28/2011 - SRO Coding Corner - 1 Replies
Hey guys, I'm working on a pixel based bot and right now I have a class set up for input that looks like this class PushKey { static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); private static extern void mouse_event(UInt32 dwFlags, UInt32 dx, UInt32 dy, UInt32 dwData, IntPtr dwExtraInfo); public static void leftClick()
Autoit mouseclicks funktionieren nur manchmal
05/20/2011 - AutoIt - 6 Replies
Hey, ich habe ein problem und zwar beschäftige ich mich mit autoit erst seit einen tag und habe schon das erste Problem und zwar MouseClick("Left",194,18) funktioniert nicht immer nur manchmal gibt es ne andere Lösung oder mache ich was flasch ?
Mouseclicks in nicht aktiven Anwedungen
10/17/2009 - AutoIt - 4 Replies
hallo, und zwar verwende ich schon soetwas while 1 $pos = MouseGetPos() sleep(10) mousemove(1171,352,1) _MouseClickPlus( "World of Warcraft", "left", 1171, 352) sleep(10)



All times are GMT +1. The time now is 20:30.


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.