#2318 closed Bug (No Bug)
simple _isPressed middle mouse is not working
Reported by: | trettt@… | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.8.1 | Severity: | None |
Keywords: | middle mouse button | Cc: | trettt@… |
Description
hold middle button in notepad, only one 'a' gets pressed
Local $hDLL = DllOpen("user32.dll")
While 1
If _IsPressed("04", $hDLL) Then
Send("{a down}")
While _IsPressed("04", $hDLL)
Sleep(2)
WEnd
Send("{a up}")
sleep(2)
EndIf
WEnd
DllClose($hDLL)
Attachments (0)
Change History (6)
comment:1 Changed 12 years ago by guinness
- Resolution set to No Bug
- Status changed from new to closed
comment:2 Changed 12 years ago by anonymous
comment:3 Changed 12 years ago by anonymous
_isPressed is fine something is wrong with my send commands :p
comment:4 Changed 12 years ago by anonymous
sending only up sends a release as well in this code.
Local $hDLL = DllOpen("user32.dll")
While 1
If _IsPressed("04", $hDLL) Then
Send("{a down}")
While _IsPressed("04", $hDLL)
Sleep(2)
WEnd
sleep(2)
EndIf
WEnd
comment:5 Changed 12 years ago by anonymous
s/sending only up sends a release as well in this code./sending only DOWN sends a release as well in this code.
comment:6 Changed 12 years ago by guinness
Please use the Forum, not Trac.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
author here
i got this code from the documentation
http://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm
#include <Misc.au3>
Local $hDLL = DllOpen("user32.dll")
While 1
WEnd
DllClose($hDLL)