Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 11:58

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

Advertisement



Bot für Battleforge, brauche Debughilfe

Discussion on Bot für Battleforge, brauche Debughilfe within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
[AutoIt]Bot für Battleforge, brauche Debughilfe

Hallo Leute,

ich wollte mir ein Skript schreiben, dass solange ich bspw. Shift drücke ganz oft F1 drückt und mit der Maus klickt. Klapt ganz gut mit:

PHP Code:
#include <Misc.au3>
$hDLL DllOpen("user32.dll")

Func Spawn()
    While 
Sleep(10)
        If 
_IsPressed("+"$hDLLThen
            Send
("{F1}"
            
mouseclick("left")
        EndIf
        EndIf
        If 
_IsPressed("52"$hDLLThen
            
Exit
        EndIf
    
WEnd
EndFunc 

So das wollte ich jetzt noch erweitern, dass man durch die einzelnen F-Tasten durchschalten kann.

Mit dem komme ich nciht weiter. Was müsste ich machen, damit es funktioniert?

PHP Code:

#include <Misc.au3>
$hDLL DllOpen("user32.dll")
HotKeySet "{q}" "change" )

$F[0]="{F1}"
$F[1]="{F2}"
$F[2]="{F3}"
$F[3]="{F4}"
$F[4]="{F5}"
$F[5]="{F6}"
$F[6]="{F7}"
$F[7]="{F8}"
$F[8]="{F9}"
$F[9]="{F10}"
$F[10]="{F11}"
$F[11]="{F12}"
$i=0

Func change
()
    
$i=$i 1
    
if $i=12 Then
        $i
=0
    
EndIf
    
Spawn()
EndFunc

Func Spawn
()
    While 
Sleep(10)
        If 
_IsPressed("+"$hDLLThen
            Send
($F[$i]) 
            
mouseclick("left")
        EndIf
        If 
_IsPressed("45"$hDLLThen
                change
()
        EndIf
        If 
_IsPressed("52"$hDLLThen
            
Exit
        EndIf
    
WEnd
EndFunc 
lg keks

PS: wenn ich die Datei in eine .exe compiliere, brauch der Anwender dann auch die <Misc.au3>? Wenn ja, wie kann ich es machen, dass derjenige auch ohne AutoIt das ausführen kann?

PPS: seid nicht zu hart zu mir, ist mein erstes AutoIt Skript und so viel Informationen bringen die Tutorials nicht :P
butter123 is offline  
Old 05/09/2011, 14:28   #2
 
HardCore.1337's Avatar
 
elite*gold: 1
Join Date: Feb 2009
Posts: 1,726
Received Thanks: 729
1) Nein, die Misc.au3 braucht der Nutzer nicht

2) Script speichern -> Auf Scriptdatei rechtsklick -> Compile Script (oder so)

Ach ja, dein Titel ist etwas ungünstig gewählt
HardCore.1337 is offline  
Reply

Tags
autoit, bug, skript




All times are GMT +1. The time now is 11:58.


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.