Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 09:10

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

Advertisement



Autoit problem

Discussion on Autoit problem within the AutoIt forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
_|Stephan|_'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 7
Received Thanks: 0
Autoit problem

Ich wollte gerade einen autoit Bot erstellen der immer die taste 4 drückt und dann kam ein error für line 6

Code:
HotKeySet("{s}", "_StartBot")
HotKeySet("{d}", "_PauseBot")
HotKeySet("{f}", "_EndeBot")

While 1
	If $Active = 1 Then
		Send ( "4" )
	EndIf
WEnd

Func _StartBot()
	$Active = 1
EndFunc

Func _PauseBot()
	$Active = 0
EndFunc

Func _EndeBot()
	Exit
EndFunc
was hab ich falsch gemacht?

danke im vorraus
_|Stephan|_ is offline  
Old 11/06/2011, 12:42   #2
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
Du musst vorher $Active declarieren.

Schreibe über der While-Schleife:

Global $Active = 0

hin, dann müsste es gehen.
omer36 is offline  
Thanks
1 User
Old 11/06/2011, 12:46   #3
 
_|Stephan|_'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 7
Received Thanks: 0
Quote:
Originally Posted by omer36 View Post
Du musst vorher $Active declarieren.

Schreibe über der While-Schleife:

Global $Active = 0

hin, dann müsste es gehen.
wieso "Global $Active = 0" ??

dankeschön für die schnelle hilfe :>
_|Stephan|_ is offline  
Old 11/06/2011, 12:54   #4
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
du fragst in zeile 6 ab ob $active = 1 ist, obwohl du dem programm ncoh garnciht gesagt hast, dass es $active überhaupt gibt. deswegen schreibst du am anfang $Active = 0 und sagst damit: $Active gibt es und es hat jetzt den wert 0. 0 damit der bot nciht gleich startet und erstmal pause macht.
butter123 is offline  
Thanks
1 User
Old 11/06/2011, 13:00   #5
 
_|Stephan|_'s Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 7
Received Thanks: 0
okay dankeschön euch beiden

btw kann ich das machen das ich zb. für _StartBot() zweik hotkeys hab? zb. F8 und alt
_|Stephan|_ is offline  
Old 11/06/2011, 14:19   #6
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
probiers aus
ich würd schätzen es geht

HotKeySet("{F8}", "_StartBot")
HotKeySet("!", "_StartBot")

ich denke so meinst dus?
butter123 is offline  
Old 11/07/2011, 13:11   #7

 
Adroxxx's Avatar
 
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,324
Adroxxx is offline  
Closed Thread




All times are GMT +1. The time now is 09:10.


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.