Bien le bonjour ,
étant donner que j'ai des des problèmes avec ma souris ,
je voulais crée un petit script qui m'aide à contrôler la souris depuis mon clavier..
alors j'ai arrivé à ceci
► Afficher le texte
#include <Misc.au3>
Global $x = 1,$t=10
$dll = DllOpen("user32.dll")
MouseMove(540, 365,10)
$pos = MouseGetPos()
HotKeySet("{DOWN}","_bas")
HotKeySet("{UP}","_haut")
HotKeySet("{LEFT}","_gauche")
HotKeySet("{RIGHT}","_droite")
HotKeySet("=","_clicd")
HotKeySet(")","_clicg")
HotKeySet("&","_vite")
HotKeySet("é","_lent")
HotKeySet("'","_norm")
Func _vite()
$t = $t - 2
EndFunc
Func _norm()
$t = 10
EndFunc
Func _lent()
$t = $t + 2
EndFunc
Func _clicg()
$x = 0
MouseClick("left",$pos[0], $pos[1],1)
EndFunc
Func _clicd()
$x = 0
MouseClick("right",$pos[0], $pos[1],1)
EndFunc
Func _bas()
$x = 1
while 1
if $x = 1 then
sleep($t)
$pos[1] = $pos[1] + 1
MouseMove( $pos[0], $pos[1],0)
Else
ExitLoop
EndIf
If _IsPressed("60", $dll) Then
ExitLoop
EndIf
If _IsPressed("DD", $dll) Then
ExitLoop
EndIf
If _IsPressed("BB", $dll) Then
ExitLoop
EndIf
WEnd
EndFunc
Func _haut()
$x = 1
while 1
if $x = 1 Then
sleep($t)
$pos[1] = $pos[1] - 1
MouseMove( $pos[0], $pos[1],0)
Else
ExitLoop
EndIf
If _IsPressed("60", $dll) Then
ExitLoop
EndIf
If _IsPressed("DD", $dll) Then
ExitLoop
EndIf
If _IsPressed("BB", $dll) Then
ExitLoop
EndIf
WEnd
EndFunc
Func _droite()
$x = 1
while 1
if $x = 1 Then
sleep($t)
$pos[0] = $pos[0] + 1
MouseMove( $pos[0], $pos[1],0)
Else
ExitLoop
EndIf
If _IsPressed("60", $dll) Then
ExitLoop
EndIf
If _IsPressed("DD", $dll) Then
ExitLoop
EndIf
If _IsPressed("BB", $dll) Then
ExitLoop
EndIf
WEnd
EndFunc
Func _gauche()
$x = 1
while 1
if $x =1 Then
sleep($t)
$pos[0] = $pos[0] - 1
MouseMove( $pos[0], $pos[1],0)
Else
ExitLoop
EndIf
If _IsPressed("60", $dll) Then
ExitLoop
EndIf
If _IsPressed("DD", $dll) Then
ExitLoop
EndIf
If _IsPressed("BB", $dll) Then
ExitLoop
EndIf
WEnd
EndFunc
tout est bon
sauf que j'ai un petit problème avec le variable $t
si je l'affecte une valeur supérieur à 0 la souris bouge un peu lent
si je l'affecte une valeur de 0 la souris bouge avec un vitesse supérieur que je puisse la contrôlée .
c'est pour cela que je poste mon sujet afin de trouver une solution pour que la sourie bouge avec une vitesse convenable ..
Amicalement .