Frage zu Skript!

05/20/2011 19:07 HAcker240#1
HI ich hab ein problem mit einem script und zwar habe ich mir ein programm was ein fadenkreuz anzeigt jedoch brauch ich hilfe weil ich nicht weiß wie ich die koordinaten des fadenkreuzes verstellen soll !!!!!

Code:
HotKeySet("{F5}", "_Run")
HotKeySet("{F7}", "_pause")
HotKeySet("{F6}", "_exit")
$color1=0x0000FF ;gelb = 0x00F0F0 ;  rot = 0x0000FF  ;  grün = 0x00FF00  ;  blau = 0xFF0000  ;  weiß = =0xFFFFFF ; lila=0xAC00A9
TrayTip("Hotkeys:", "F5 Start; F6 Ende ;)", 5)
_pause()

Func _Run()
    $handle = ControlGetHandle("paskjh^2g387zaisug2937856", "", 1);$handle = ControlGetHandle("Counter-Strike", "", 1)
    While 1
    SetPixel($handle, @DesktopWidth/2, @DesktopHeight/2, $color1)
    For $i=1 To 10
        SetPixel($handle, @DesktopWidth/2+$i, @DesktopHeight/2, $color1)
        SetPixel($handle, @DesktopWidth/2-$i, @DesktopHeight/2, $color1)
        Sleep(0.1)
        SetPixel($handle, @DesktopWidth/2, @DesktopHeight/2+$i, $color1)
        SetPixel($handle, @DesktopWidth/2, @DesktopHeight/2-$i, $color1)
    Next
    Sleep(0.1)
    WEnd
EndFunc ;==>_Run

Func SetPixel($handle, $x, $y, $color)
    $dc = DllCall("user32.dll", "int", "GetDC", "hwnd", $handle)
    $setpixel = DllCall("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
    $realesedc = DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "int", $dc[0])
EndFunc   ;==>SetPixel

Func _pause()
    While True
        Sleep(1000)
    WEnd
EndFunc ;==>_pause

Func _exit()
    Exit
EndFunc ;==>_exit
Wäre nett wenn mir eienr helfen könnte :)
05/21/2011 17:12 derpo#2
Ich habe das Ganze mal geändert (mit den Pfeiltasten kannst du das Zielkreuz steuern, falls das Fenster sich aktualisiert) :
PHP Code:
#include <Misc.au3>
HotKeySet("{F5}""_Run")
HotKeySet("{F7}""_pause")
HotKeySet("{F6}""_exit")
$color1=0x0000FF ;gelb 0x00F0F0 ;  rot 0x0000FF  ;  grün 0x00FF00  ;  blau 0xFF0000  ;  weiß = =0xFFFFFF lila=0xAC00A9
TrayTip
("Hotkeys:""F5 Start; F6 Ende ;)"5)
_pause()
Func _Run()
    
$x = @DesktopWidth 2
    $y 
= @DesktopHeight 2
    $handle 
ControlGetHandle("[ACTIVE]"""1);$handle ControlGetHandle("Counter-Strike"""1)
    While 
1
    
If _IsPressed("25"Then
        $x 
$x 1
    
EndIf
    If 
_IsPressed("26"Then
        $y 
$y 1
    
EndIf
    If 
_IsPressed("27"Then
        $x 
$x 1
    
EndIf
    If 
_IsPressed("28"Then
        $y 
$y 1
    
EndIf
    
SetPixel($handle$x$y$color1)
    For 
$i=1 To 10
        SetPixel
($handle$x+$i$y$color1)
        
SetPixel($handle$x-$i$y$color1)
        
SetPixel($handle$x$y+$i$color1)
        
SetPixel($handle$x$y-$i$color1)
    
Next
    Sleep
(10)
    
WEnd
EndFunc 
;==>_Run

Func SetPixel
($handle$x$y$color)
    
$dc DllCall("user32.dll""int""GetDC""hwnd"$handle)
    
$setpixel DllCall("gdi32.dll""long""SetPixel""long"$dc[0], "long"$x"long"$y"long"$color)
    
$realesedc DllCall("user32.dll""int""ReleaseDC""hwnd"0"int"$dc[0])
EndFunc   ;==>SetPixel

Func _pause
()
    While 
True
        Sleep
(1000)
    
WEnd
EndFunc 
;==>_pause

Func _exit
()
    Exit
EndFunc ;==>_exit 
05/21/2011 19:20 WennsHilft#3
@derpo

Ich finde es ja toll wenn das Script verbessert wird ^^
aber meinst du das mit den Pfeiltasten ist Sinnvoll?
(nache dreh ich mich nach links und das CrossHiar rennt weg ^^)

Den Hotkey F7 hättest du auch ganz streichen können.


EDIT: Größe und Farbe wären vlt. Cool.
05/21/2011 19:24 omer36#4
Quote:
Originally Posted by WennsHilft View Post
@derpo

Ich finde es ja toll wenn das Script verbessert wird ^^
aber meinst du das mit den Pfeiltasten ist Sinnvoll?
(nache dreh ich mich nach links und das CrossHiar rennt weg ^^)

Den Hotkey F7 hättest du auch ganz streichen können.


EDIT: Größe und Farbe wären vlt. Cool.
W A S D ftw! :D
05/21/2011 19:53 WennsHilft#5
@omer36

Es gibt auch leute die andere Games zocken.
(und das ganz ohne maus)
05/21/2011 20:27 omer36#6
Quote:
Originally Posted by WennsHilft View Post
@omer36

Es gibt auch leute die andere Games zocken.
(und das ganz ohne maus)
und dafür braucht man nen fadenkreuz? :rolleyes:
05/21/2011 21:09 HAcker240#7
Quote:
Ich habe das Ganze mal geändert (mit den Pfeiltasten kannst du das Zielkreuz steuern, falls das Fenster sich aktualisiert) :
Danke ich werds gleich mal ausprobieren :)
Quote:
Größe und Farbe wären vlt. Cool.
->Farbe is doch dabei
PHP Code:
$color1=0x0000FF ;gelb 0x00F0F0 ;  rot 0x0000FF  ;  grün 0x00FF00  ;  blau 0xFF0000  ;  weiß = =0xFFFFFF lila=0xAC00A9 
Ohh habs gerade ausprobiert aber leider is das fadenkreuz wenn ich im spiel bin nich mehr im vordergrund -.- was muss man dafür verändern ???
05/21/2011 23:00 WennsHilft#8
@omar36: Es gibt genug Games ohne CH, zum streiten suchst du dir bitte jemand anderen.

@HAcker240: ja im Script stehen se drinn, aber als .exe wären se dann unerreichbar ^^
(HotKey= Color)
05/22/2011 10:58 derpo#9
PHP Code:
    $handle ControlGetHandle("[ACTIVE]"""1)
    
$timer TimerInit()
    While 
1
        
If TimerDiff($timer) >= 2000 Then
            $handle 
ControlGetHandle("[ACTIVE]"""1)
            
$timer TimerInit()
        EndIf 
Hier nochmal eine Keyliste für _IsPressed :

Quote:
Originally Posted by WennsHilft View Post
@derpo

Den Hotkey F7 hättest du auch ganz streichen können.
Der war schon am Anfang da
05/23/2011 13:43 WennsHilft#10
ok sorry ^^