Da ist mal ein Problem gelöst..
schon taucht das nächste auf, diesmal jedoch etwas... anderes.
Theoretisch sollte dieses "Problem" so, garnicht vorhanden sein.
Um es aber besser zu verstehen solltet ihr den Script tatsächlich selber mal ausführen.
Beispiel:
Wählt als Function: Combo WASD
als Direction: Combo
und als Distance: am besten 1
nun klickt auf "Done"..
Was nun passiert ist merkwürdig.. und zwar..
Drückt man "W" bewegt sich die Maus wie gewollt nach oben.. JEDOCH ... nicht mit dem gleichen Tempo wie zb: "A", "S" oder "D" ...
bei mir ist "A" am schnellsten.. Danach kommt "W" und "D" ... "S" ist am langsamsten..
Das selbe stelle ich bei Combo ARROW fest.
jedoch ist da "Up" am schnellsten, gefolgt von "Left" und "Right", die sich die selbe geschwindigkeit teilen... nur "Down" ist wieder am langsamsten.
Nun die ultimative Frage:
Warum?
Am script kann es doch nicht liegen, oder?
Übersehe ich was?
Bin sehr auf eure antworten gespannt..
Falls sich wer dazu äußern kann.
Script:
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: ThirtySix
Script Function:
MouseMove
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
Opt("GuiOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$MouseMove = GUICreate("MouseMove", 227, 124, 461, 286)
GUISetBkColor(0x9DB9EB)
$Done = GUICtrlCreateButton("Done", 16, 14, 75, 25)
$Info = GUICtrlCreateButton("Info", 16, 78, 75, 25)
$PressedKey = GUICtrlCreateCombo("", 104, 16, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
GUICtrlSendMsg($PressedKey, 0x1703, 0, "Function")
$PosDir = GUICtrlCreateCombo("", 104, 48, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "Up|Down|Left|Right|Combo")
GUICtrlSendMsg($PosDir, 0x1703, 0, "Direction")
$Far = GUICtrlCreateCombo("", 104, 80, 105, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE))
GUICtrlSetData(-1, "1|2|5|10|25|50|75|100|150|250|350|500|750|1000|2000|5000|")
GUICtrlSendMsg($Far, 0x1703, 0, "Distance")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlSetOnEvent($Done, "_Done")
GUICtrlSetOnEvent($Info, "_Info")
Global $WKey, $AKey, $SKey, $DKey, $UpKey, $DownKey, $LeftKey, $RightKey, $xKey, $Key, $Dir, $pos, $x, $y, $DLL = DllOpen("user32.dll")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
If _IsPressed($xKey, $DLL) Then
$pos = MouseGetPos()
If $Dir = "Up" OR $Dir = "Left" Then
MouseMove($pos[0]-$x, $pos[1]-$y)
EndIf
If $Dir = "Down" OR $Dir = "Right" Then
MouseMove($pos[0]+$x, $pos[1]+$y)
EndIf
EndIf
If _IsPressed($WKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]-$y)
EndIf
If _IsPressed($AKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]-$x, $pos[1])
EndIf
If _IsPressed($SKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]+$y)
EndIf
If _IsPressed($DKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]+$x, $pos[1])
EndIf
If _IsPressed($UpKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]-$y)
EndIf
If _IsPressed($LeftKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]-$x, $pos[1])
EndIf
If _IsPressed($DownKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0], $pos[1]+$y)
EndIf
If _IsPressed($RightKey, $DLL) Then
$pos = MouseGetPos()
MouseMove($pos[0]+$x, $pos[1])
EndIf
Wend
Func _Done()
if GUICtrlRead($Done) = "Done" Then
If GUICtrlRead($PressedKey) = "" OR GUICtrlRead($PosDir) = "" OR GUICtrlRead($Far) = "" Then
MsgBox(0,"error","First: Setup"&@CRLF&"Then: Done")
Else
$Key = GUICtrlRead($PressedKey)
$Dir = GUICtrlRead($PosDir)
$Farcheck = GUICtrlRead($Far)
GUICtrlSetData($Done,"Reset")
If $Key = "M1" Then $xKey = 01
If $Key = "M2" Then $xKey = 02
If $Key = "M3" Then $xKey = 04
If $Key = "Shift" Then $xKey = 10
If $Key = "CTRL" Then $xKey = 11
If $Key = "W" Then $xKey = 57
If $Key = "A" Then $xKey = 41
If $Key = "S" Then $xKey = 53
If $Key = "D" Then $xKey = 44
If $Key = "Up" Then $xKey = 26
If $Key = "Down" Then $xKey = 28
If $Key = "Left" Then $xKey = 25
If $Key = "Right" Then $xKey = 27
If $Key = "Combo WASD" Then
$WKey = 57
$AKey = 41
$SKey = 53
$DKey = 44
GUICtrlSetData($PosDir,"Combo")
$Dir = "ALL"
EndIf
If $Key = "Combo ARROW" Then
$UpKey = 26
$DownKey = 28
$LeftKey = 25
$RightKey = 27
GUICtrlSetData($PosDir,"Combo")
$Dir = "ALL"
EndIf
If $Dir = "Up" Or $Dir = "Down" Then $y = $Farcheck
If $Dir = "Left" Or $Dir = "Right" Then $x = $Farcheck
If $Dir = "ALL" Then
$x = $Farcheck
$y = $Farcheck
EndIf
GUICtrlSetState($PosDir, $GUI_DISABLE)
GUICtrlSetState($PressedKey, $GUI_DISABLE)
GUICtrlSetState($Far, $GUI_DISABLE)
;~ MsgBox(0,"",$WKey&"=W "&$AKey&"=A "&$SKey&"=S "&$DKey&"=D "&$UpKey&"=up "&$DownKey&"=down "&$LeftKey&"=left "&$RightKey&"=right "&$xKey&"=xkey "&$Key&"=key "&$Dir&"=dir "&$x&"=x "&$y&"=y "&$Farcheck&"=FC")
EndIf
Else
$x = ""
$y = ""
$Key = ""
$WKey = ""
$AKey = ""
$SKey = ""
$DKey = ""
$UpKey = ""
$DownKey = ""
$LeftKey = ""
$RightKey = ""
$Dir = ""
$xKey = ""
$Farcheck = ""
GUICtrlSetData($Done,"Done")
GUICtrlSetData($PressedKey,"")
GUICtrlSetData($PressedKey, "M1|M2|M3|Shift|CTRL|W|A|S|D|Up|Down|Left|Right|Combo WASD|Combo ARROW")
GUICtrlSetData($PosDir,"")
GUICtrlSetData($PosDir, "Up|Down|Left|Right|Combo")
GUICtrlSetData($Far,"")
GUICtrlSetData($Far, "1|2|5|10|25|50|75|100|150|250|350|500|750|1000|2000|5000|")
GUICtrlSetState($PosDir, $GUI_ENABLE)
GUICtrlSetState($PressedKey, $GUI_ENABLE)
GUICtrlSetState($Far, $GUI_ENABLE)
EndIf
EndFunc
Func _Info()
MsgBox(0, "MouseMove", "Coded by ThirtySix")
EndFunc
Func _Exit()
DllClose($DLL)
Exit
EndFunc