FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MBPython/MBPython/message.py at master · lochen88/MBPython · GitHub
lochen88
/
MBPython
Public
Notifications
You must be signed in to change notification settings
Fork
12
Star
62
Code
Issues
3
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MBPython
/
MBPython
/
message.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (34 loc) · 1.36 KB
Breadcrumbs
MBPython
/
MBPython
/
message.py
Copy path
File metadata and controls
44 lines (34 loc) · 1.36 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- coding:utf-8 -*-
from
ctypes
import
(
windll
,
c_long
,
c_ulong
,
c_ushort
)
from
.
wkeStruct
import
mPos
user32
=
windll
.
user32
class
Message
():
def
__init__
(
self
,
miniblink
):
self
.
mb
=
miniblink
def
wkeFireMouseEvent
(
self
,
webview
,
msg
,
x
,
y
,
flags
=
0
):
return
self
.
mb
.
wkeFireMouseEvent
(
webview
,
msg
,
x
,
y
,
flags
)
def
wkeFireKeyDownEvent
(
self
,
webview
,
virtualKeyCode
,
flags
=
0
):
return
self
.
mb
.
wkeFireKeyDownEvent
(
webview
,
virtualKeyCode
,
flags
,
False
)
def
wkeFireKeyUpEvent
(
self
,
webview
,
virtualKeyCode
,
flags
=
0
):
return
self
.
mb
.
wkeFireKeyUpEvent
(
webview
,
virtualKeyCode
,
flags
,
False
)
def
wkeFireKeyPressEvent
(
self
,
webview
,
virtualKeyCode
,
flags
):
return
self
.
mb
.
wkeFireKeyPressEvent
(
webview
,
virtualKeyCode
,
flags
,
False
)
def
wkeFireWindowsMessage
(
self
,
webview
,
hwnd
,
msg
,
wParam
,
lParam
,
result
):
return
self
.
mb
.
wkeFireWindowsMessage
(
webview
,
hwnd
,
msg
,
wParam
,
lParam
,
result
)
@
staticmethod
def
fire_mouse_msg
(
hwnd
,
msg
,
x
,
y
):
pos
=
c_long
(
c_ushort
(
x
).
value
|
c_ulong
(
c_ushort
(
y
).
value
).
value
<<
16
).
value
return
user32
.
PostMessageW
(
hwnd
,
msg
,
0
,
pos
)
@
staticmethod
def
fire_keyboard_msg
(
hwnd
,
virtualKeyCode
,
msg
):
return
user32
.
SendMessageW
(
hwnd
,
msg
,
virtualKeyCode
,
0
)
@
staticmethod
def
get_mouse_pos
():
p
=
mPos
()
user32
.
GetCursorPos
(
byref
(
p
))
return
p
Back
|
FazBrowse Home
|
New Git URL