-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdd.py
44 lines (36 loc) · 859 Bytes
/
dd.py
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
from ctypes import *
import time
from win32com.client import Dispatch
import time
import sys, os
print("Load DD!")
dd_dll = windll.LoadLibrary('D:\DD94687.64.dll')
time.sleep(2)
st = dd_dll.DD_btn(0) #DD Initialize
if st==1:
print("OK")
else:
print("Error")
exit(101)
print("Keyboard Left win")
#LWin is 601 in ddcode, 1=down, 2=up.
# dd_dll.DD_key(601, 1)
# dd_dll.DD_key(601, 2)
# time.sleep(2)
print("Mouse move abs.")
dd_dll.DD_mov(200, 200)
time.sleep(2)
op = Dispatch("op.opsoft")
# run all test
print("test begin")
this_dir = os.path.split(sys.argv[0])[0]
dm_ret = op.SetPath(this_dir)
op_ret = op.SetDict(0, "dm_soft.txt")
# print("Mouse move rel.")
# dd_dll.DD_movR(50, 50)
# time.sleep(2)
print("Mouse Right button ")
#1==L.down, 2==L.up, 4==R.down, 8==R.up, 16==M.down, 32==M.up
dd_dll.DD_btn(4)
dd_dll.DD_btn(8)
time.sleep(2)