Modify ↓
#2318 closed Bug (No Bug)
simple _isPressed middle mouse is not working
| Reported by: | 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 by , 13 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , 13 years ago
comment:4 by , 13 years ago
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 by , 13 years ago
s/sending only up sends a release as well in this code./sending only DOWN sends a release as well in this code.
Note:
See TracTickets
for help on using tickets.

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)