控制另一个程序里的数据窗口
2017-09-07 09:17
232 查看
通过测试发现使用Post(ll_dw_handle, 1305, 0, 0) ,可以使数据窗口弹出saveas的对话框,经过进一步的试验,发现wparam和lparam参数的含义分别是 :saveas type和 savefilename字符串的地址,所以我们就可以使用发送消息的方式使数据窗口内容保存为文本文件,然后读取文件就可以获取数据了。
我在pb程序中的测试代码:
Function integer SndMsg(long hWnd, long uMsg, long wp, &
ref string filename) library “user32.dll” Alias For “SendMessageA”
long ll_handle
ll_handle = handle(dw_1)
string s
s=”c:\111.txt”
SndMsg(ll_dw_handle, 1305, 2, s)
如果要编写一个数据窗口外挂程序,只要得到数据窗口的句柄就可以了。
以下为消息对应的Datawindow命令(网上搜索的资料)
我在pb程序中的测试代码:
Function integer SndMsg(long hWnd, long uMsg, long wp, &
ref string filename) library “user32.dll” Alias For “SendMessageA”
long ll_handle
ll_handle = handle(dw_1)
string s
s=”c:\111.txt”
SndMsg(ll_dw_handle, 1305, 2, s)
如果要编写一个数据窗口外挂程序,只要得到数据窗口的句柄就可以了。
以下为消息对应的Datawindow命令(网上搜索的资料)
Function | Power script |
---|---|
Retrieve | Post(ll_handle, 1306, 0, 0) |
- | Post(ll_handle, 1320, 0, 0) |
Retrieve (yield) | Post(ll_handle, 1306, 1, 0) |
- | Post(ll_handle, 1320, 0, 0) |
ScrollNextPage | Post(ll_handle, 1318, 0, 0) |
ScrollPriorPage | Post(ll_handle, 1319, 0, 0) |
ScrollToFirstPage | Post(ll_handle, 1315, 0, 1) |
ScrollToLastPage | Post(ll_handle, 1315, 0, 999999) |
Sort Dialog | Post(ll_handle, 1309, 0, 0) |
Filter Dialog | Post(ll_handle, 1311, 0, 0) |
Append Row | Post(ll_handle, 1357, 0, 0) |
- | Post(ll_handle, 1312, 0, 0) |
- | Post(ll_handle, 1315, 0, 999999) |
- | Post(ll_handle, 1325, 0, 0) |
InsertRow | Post(ll_handle, 1357, 0, 0) |
- | Post(ll_handle, 1313, 0, 0) |
- | Post(ll_handle, 1312, 0, 1) |
- | Post(ll_handle, 1315, 0, 1) |
- | Post(ll_handle, 1325, 0, 0) |
DeleteRow | Post(ll_handle, 1357, 0, 0) |
- | Post(ll_handle, 1307, 0, 0) |
Update | Post(ll_handle, 1357, 0, 0) |
- | Post(ll_handle, 1338, 0, 0) |
- | Post(ll_handle, 1304, 0, 0) |
SaveAs Dialog | Post(ll_handle, 1338, 0, 0) |
- | Post(ll_handle, 1305, 0, 0) |
Post(ll_handle, 1303, 0, 0) | |
Cancel | Post(ll_handle, 1320, 0, 0) |
相关文章推荐
- 控制另一个程序里的数据窗口
- 编写一个聊天程序:有接收数据部分,和发数据的部分, 这两部分需要同时执行,使用多线程实现,一个控制接收,一个控制发送
- PB中数据窗口导出数据到EXCEL的程序(3)
- PB中数据窗口导出数据到EXCEL的程序(2)
- 如何控制其他程序窗体上的窗口控件
- 给某位同学的 按照窗口(每个窗口涵盖50个数据,窗口每10个数据步进一次)求标准差,平均值, (样本值-平均值)/标准差的程序
- Java基础--数据类型,运算符,程序控制语句
- PB如何在Datawindow(数据窗口)中控制列的修改方式
- Mac中启动另一个程序并将窗口置于最前面
- 子线程如何获取和设置 或者控制窗口实时显示数据(网上的资料经个人整理拼凑总结)
- ios程序启动原理与窗口、控制加载、控制器view加载、导航控制器加载
- 在ASP中用程序控制弹出NTLM验证窗口
- java程序控制台输入数据的一种方法
- Qt程序 与 CMD窗口弹出的控制
- 微信小程序------页面间数据控制
- C#可调用API接口来获取窗口句柄,发送消息控制其余程序窗体大小
- PB中数据窗口导出数据到EXCEL的程序(4)
- PB数据窗口中多行选中程序
- 第三讲_从数据库中拿数据到Java程序中并在新窗口中显示
- PB中数据窗口导出数据到EXCEL的程序(3)