hallo, ist es möglich nur die Maus-Achsen zu blocken?
mit "BlockInput" werden ja alle (fast) eingaben geblockt.
BlockInput
-
Dr.Galvany -
1. August 2006 um 22:32 -
Geschlossen -
Erledigt
-
-
- Offizieller Beitrag
Soll die Maus komplett deaktivert werden oder soll man sie nur nicht mehr bewegen können. Sprich sollen die Maustasten noch aktiv sien?
-
- Offizieller Beitrag
HI,
guck mal nach _MouseTrap() in der Beta.
So long,
Mega
-
hallo, wenn es geht, sollten nur die achsen aus sein.
-
- Offizieller Beitrag
@th.meger, an die Funktion habe ich auch gedacht!
Hier ein kleines Beispiel, mit Shift+Alt+h kann die Mause angehalten und wieder freigegeben werden:
-
- Offizieller Beitrag
Hi,
schönes Beispiel. Ähm, nur die Achsen aus? Dann kann man die Maus doch nicht mehr bewegen. Also ich kann meine Maus nur auf x oder y-Achse bewegen.
Oder meinst du, man soll die Maus weder gerade nach links rechts oben oder unten bewegen dürfen?
So long,
Mega
-
hallo, das ist warscheinlich schon das wie es gedacht ist.
es geht auch teilweise.nur wenn der befehl aktiv wird, wärend sich das bild schon bewegt, bewegt sich das bild weiter.
-
- Offizieller Beitrag
Hi,
welches Bild? Kannst deinen Code posten? Dann könnte man es nachvollziehen.
So long,
Mega
-
hallo, hier mal ein BS:
Spoiler anzeigen
PHP
Alles anzeigen; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1.131 beta ; Author: Dr.Galvany ; ; ---------------------------------------------------------------------------- #include <GUIConstants.au3> opt("MouseCoordMode", 0) opt("PixelCoordMode", 0) opt("MouseClickDelay", 0) opt("MouseClickDownDelay", 0) While 1 $SelectionForm = GUICreate("Pixel sucher", 298, 83, 350, 400) GUICtrlCreateLabel("Starte das Spiel:", 32, 8, 81, 17) $PingPoll = GUICtrlCreateButton("Ping Poll", 162, 40, 60, 25) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $PingPoll $gamename = "Ping Poll" GUIDelete($SelectionForm) ExitLoop Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd $oGame = ObjCreate ("ShockwaveFlash.ShockwaveFlash.1") $GameForm = GUICreate($gamename & ": Pixel sucher", 820, 660, -1, -1) $GUIActiveX = GUICtrlCreateObj ($oGame, 10, 10, 800, 580) $exitbutton = GUICtrlCreateButton("Exit", 704, 624, 89, 25) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") If $gamename = "Ping Poll" Then With $oGame .bgcolor = "#000000" .Movie = 'http://www.2flashgames.com/anjh123hhf923/flash/f-178.swf' .ScaleMode = 2 .Loop = True .wmode = "Opaque" EndWith EndIf GUISetState() While 1 $coord = PixelSearch(10, 10, 800, 580, 0xfcfffb) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) EndIf $msg = GUIGetMsg() Select Case $msg = $exitbutton ExitLoop 2 Case $msg = $GUI_EVENT_CLOSE ExitLoop 2 EndSelect WEnd WEnd
-
- Offizieller Beitrag
Tut mir leid, ich kann jetzt irgendwie keine Beziehung zw. deinem Ursprünglichen Problem:
ZitatOriginal von Dr.Galvany
hallo, ist es möglich nur die Maus-Achsen zu blocken?
mit "BlockInput" werden ja alle (fast) eingaben geblockt.und dem was du im letzten Post geschrieben hast, herstellen. :hammer:
Vllt. solltest du schreiben was du willst?
-
wenn doch das script läuft, und ich bewege die maus, so beeinflusst es doch das script, da das script die maus doch selbst steuert.
-
- Offizieller Beitrag
Probiers mal so:
Spoiler anzeigen
C
Alles anzeigen; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1.131 beta ; Author: Dr.Galvany ; ; ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <Misc.au3> ;~ opt("MouseCoordMode", 0) ;~ opt("PixelCoordMode", 0) opt("MouseClickDelay", 0) opt("MouseClickDownDelay", 0) HotKeySet("+!h","_holdMouse") While 1 $SelectionForm = GUICreate("Pixel sucher", 298, 83, 350, 400) GUICtrlCreateLabel("Starte das Spiel:", 32, 8, 81, 17) $PingPoll = GUICtrlCreateButton("Ping Poll", 162, 40, 60, 25) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $PingPoll $gamename = "Ping Poll" GUIDelete($SelectionForm) ExitLoop Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd GUIDelete() $oGame = ObjCreate ("ShockwaveFlash.ShockwaveFlash.1") $GameForm = GUICreate($gamename & ": Pixel sucher", 820, 660, -1, -1) $GUIActiveX = GUICtrlCreateObj ($oGame, 10, 10, 800, 580) $exitbutton = GUICtrlCreateButton("Exit", 704, 624, 89, 25) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") If $gamename = "Ping Poll" Then With $oGame .bgcolor = "#000000" .Movie = 'http://www.2flashgames.com/anjh123hhf923/flash/f-178.swf' .ScaleMode = 2 .Loop = True .wmode = "Opaque" EndWith EndIf GUISetState() ;~ _holdMouse() While 1 $coord = PixelSearch(10, 10, 800, 580, 0xfcfffb) If IsArray($coord) = 1 Then _releaseMouse() MouseMove($coord[0], $coord[1], 0) _holdMouse() EndIf $msg = GUIGetMsg() Select Case $msg = $exitbutton ExitLoop 2 Case $msg = $GUI_EVENT_CLOSE ExitLoop 2 EndSelect WEnd WEnd Func OnAutoItExit() _releaseMouse() EndFunc Func _holdMouse() $Pos = MouseGetPos() _MouseTrap($Pos[0],$Pos[1]) HotKeySet("+!h","_releaseMouse") EndFunc Func _releaseMouse() _MouseTrap() HotKeySet("+!h","_holdMouse") EndFunc
-
hallo bernd, ich kann leider keinen unterschied feststellen.
-
- Offizieller Beitrag
Nach dem das Spiel gestartet ist kann ich mit der Maus nicht mehr beeinflussen, kann aber an der Trägheit von meinem Touchpad liegen.
Vllt geht ja das: (MouseMove durch _MouseTrap ersetzt)
C
Alles anzeigen; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1.131 beta ; Author: Dr.Galvany ; ; ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <Misc.au3> ;~ opt("MouseCoordMode", 0) ;~ opt("PixelCoordMode", 0) opt("MouseClickDelay", 0) opt("MouseClickDownDelay", 0) While 1 $SelectionForm = GUICreate("Pixel sucher", 298, 83, 350, 400) GUICtrlCreateLabel("Starte das Spiel:", 32, 8, 81, 17) $PingPoll = GUICtrlCreateButton("Ping Poll", 162, 40, 60, 25) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $PingPoll $gamename = "Ping Poll" GUIDelete($SelectionForm) ExitLoop Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd $oGame = ObjCreate ("ShockwaveFlash.ShockwaveFlash.1") $GameForm = GUICreate($gamename & ": Pixel sucher", 820, 660, -1, -1) $GUIActiveX = GUICtrlCreateObj ($oGame, 10, 10, 800, 580) $exitbutton = GUICtrlCreateButton("Exit", 704, 624, 89, 25) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") If $gamename = "Ping Poll" Then With $oGame .bgcolor = "#000000" .Movie = 'http://www.2flashgames.com/anjh123hhf923/flash/f-178.swf' .ScaleMode = 2 .Loop = True .wmode = "Opaque" EndWith EndIf GUISetState() While 1 $coord = PixelSearch(10, 10, 800, 580, 0xfcfffb) If IsArray($coord) = 1 Then _holdMouse($coord) EndIf $msg = GUIGetMsg() Select Case $msg = $exitbutton ExitLoop 2 Case $msg = $GUI_EVENT_CLOSE ExitLoop 2 EndSelect Sleep(2) WEnd WEnd Func OnAutoItExit() _releaseMouse() EndFunc Func _holdMouse($Pos = "") If Not IsArray($Pos) Then $Pos = MouseGetPos() _MouseTrap($Pos[0],$Pos[1]) EndFunc Func _releaseMouse() _MouseTrap() EndFunc
-
hehe, ja das geht!! :kiss:
danke