标题: 求个高手帮忙把按键的代码移植到TC上 [打印本页] 作者: xxhuangjiakang1 时间: 2013-6-11 17:42 标题: 求个高手帮忙把按键的代码移植到TC上 Set dm = createobject("dm.dmsoft")
TracePrint dm.Ver()
//dm.setPath "C:\cj"
Hwnd = dm.GetMousePointWindow()
dm_rect = dm.BindWindow(Hwnd, "dx2", "windows", "windows", 0)
Delay 1500
If dm_rect = 0 Then
MessageBox "后台绑定失败"
EndScript
End If
While True
dm.KeyPressChar "9"
Delay 5
i = 99999999
While i > 0
dm.KeyPressChar "U"
Delay 5
dm.KeyPressChar "1"
Delay 5
dm_ret = dm.CmpColor(733, 709,"7B0000",0.9)
If dm_ret = 0 Then
//MessageBox "相等"
dm.KeyPressChar "F1"
End If
Delay 5
dm_ret = dm.CmpColor(682, 722,"21419c",0.9)
If dm_ret = 0 Then
//MessageBox "相等"
dm.KeyPressChar "F2"
End If
Delay 5
dm_ret = dm.CmpColor(80, 186,"080852",0.6)
If dm_ret = 0 Then
//MessageBox "相等"
dm.KeyPressChar "9"
End If
i = i - 1
Wend
Wend
dm_rect = dm.UnBindWindow()
Delay 1500
If dm_rect = 0 Then
MessageBox "后台绑定失败"
EndScript
End If
While True
dm.KeyPressChar "9"
i = 99999999
While i > 0
Delay 5
dm_ret = dm.CmpColor(733, 709,"7B0000",0.9)
If dm_ret = 0 Then
//MessageBox "相等"
dm.KeyPressChar "F1"
End If
Delay 5
dm_ret = dm.CmpColor(682, 722,"21419c",0.9)
If dm_ret = 0 Then
//MessageBox "相等"
dm.KeyPressChar "F2"
End If
Delay 5
dm_ret = dm.CmpColor(80, 186,"080852",0.6)
If dm_ret = 0 Then
//MessageBox "相等"
dm.KeyPressChar "9"
End If
i = i - 1
Wend
Wend
dm_rect = dm.UnBindWindow()
这是按键精灵的源码 求高手帮下帮移到TC上 改怎么写?QQ350903885作者: fsfsgdg 时间: 2013-6-11 21:22
空间 移植
//默认空间
dm=com("dm.dmsoft")//Set dm = createobject("dm.dmsoft")