大漠多线程
datediff吧
全部回复
仅看楼主
level 8
lele1894 楼主
DimEnv 环境变量名
Call 注册大漠()
//<>------------------------------
//================主线程==============//
While true
key = WaitKey()
If key = 118 Then
环境变量名 = dm.GetMousePointWindow()
BeginThread 多线程
End If
Wend
//================主线程==============//
//<>------------------------------
//================子线程==============//
Sub 多线程()
i = 0
set dm = createobject("dm.dmsoft")
//↑大漠·注册
dm.SetPath ".\plugin\大漠梦想"
//↑指定“全局路径”
Call 绑定()
rem start
dm.SendString hwnd, "我是来测试的"&i
dm.KeyPress 13
Delay 1000
i = i + 1
Goto start
End Sub
//================子线程==============//
//<>------------------------------
//================子程序==============//
Sub 绑定()
hwnd = 环境变量名
dm_ret = dm.BindWindow(hwnd,"dx2","normal","windows",0)
If dm_ret = 0 Then //1:成功 0:失败
MessageBox "绑定失败"
Else
TracePrint dm_ret
End If
End Sub
//<>------------------------------
Sub 注册大漠()
PutAttachment ".\plugin","*.dll"
PutAttachment ".\plugin\大漠梦想","*.bmp"
PutAttachment ".\plugin\大漠梦想","*.txt"
PutAttachment ".\plugin\大漠梦想","dm.dll"
//↑PutAttachment释放附件
Call Plugin.RegDll.Reg(".\plugin\大漠梦想\dm.dll")
set dm = createobject("dm.dmsoft")
//↑大漠·注册
dm.SetPath ".\plugin\大漠梦想"
//↑指定“全局路径”
//dm.SetDict 0,"dm_soft.txt"
//↑相对路径……第一个·字库
Delay 40
End Sub
//<>------------------------------
Sub OnScriptExit()
dm_ret = dm.UnBindWindow()
End Sub
//================子程序==============//
Event Form1.InputBox1.Change
End Event
2015年03月31日 12点03分 1
1