祝愿大家身体健康!

 站点注册  找回密码
 站点注册

QQ登录

只需一步,快速开始

查看: 6865|回复: 1

[PB9.X以前] PB9代码:QQ连续发送信息脚本

[复制链接]

[PB9.X以前] PB9代码:QQ连续发送信息脚本

[复制链接]
菜鸟

主题

0

回帖

1865

积分

金牌会员

积分
1865
贡献
在线时间
小时
2020-12-5 12:16:35 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?站点注册

×
本帖最后由 菜鸟 于 2020-12-5 12:23 编辑

csdn发了一份,不给审核,所以这里再发一份
下面有gif演示;
代码很简单:取聊天窗口句柄,获取文本输入框,填充内容,模拟回车按键触发发送按钮;
  1. forward
  2. global type w_demo1 from window
  3. end type
  4. type st_4 from statictext within w_demo1
  5. end type
  6. type mle_msg from multilineedit within w_demo1
  7. end type
  8. type sle_number from singlelineedit within w_demo1
  9. end type
  10. type sle_name from singlelineedit within w_demo1
  11. end type
  12. type cb_1 from commandbutton within w_demo1
  13. end type
  14. type st_3 from statictext within w_demo1
  15. end type
  16. type st_2 from statictext within w_demo1
  17. end type
  18. type st_1 from statictext within w_demo1
  19. end type
  20. end forward

  21. global type w_demo1 from window
  22. integer width = 1763
  23. integer height = 1162
  24. boolean titlebar = true
  25. string title = "QQ炸群"
  26. boolean controlmenu = true
  27. boolean resizable = true
  28. long backcolor = 16777215
  29. string icon = "AppIcon!"
  30. boolean center = true
  31. st_4 st_4
  32. mle_msg mle_msg
  33. sle_number sle_number
  34. sle_name sle_name
  35. cb_1 cb_1
  36. st_3 st_3
  37. st_2 st_2
  38. st_1 st_1
  39. end type
  40. global w_demo1 w_demo1

  41. type prototypes
  42. function ulong FindWindowA (String lpClassName,String lpWindowName) Library "user32.dll"
  43. function ulong FindWindowExA( long hParent, long hChildAfter, String lpszClass, String lpszWindow ) Library "user32"
  44. function ulong SendMessageA(long hwnd,long wMsg,long wParam,long lParam) Library "user32.dll"

  45. FUNCTION ulong ShowWindow(ulong hWnd,ulong nCmdShow) LIBRARY "user32.dll"







  46. end prototypes

  47. on w_demo1.create
  48. this.st_4=create st_4
  49. this.mle_msg=create mle_msg
  50. this.sle_number=create sle_number
  51. this.sle_name=create sle_name
  52. this.cb_1=create cb_1
  53. this.st_3=create st_3
  54. this.st_2=create st_2
  55. this.st_1=create st_1
  56. this.Control[]={this.st_4,&
  57. this.mle_msg,&
  58. this.sle_number,&
  59. this.sle_name,&
  60. this.cb_1,&
  61. this.st_3,&
  62. this.st_2,&
  63. this.st_1}
  64. end on

  65. on w_demo1.destroy
  66. destroy(this.st_4)
  67. destroy(this.mle_msg)
  68. destroy(this.sle_number)
  69. destroy(this.sle_name)
  70. destroy(this.cb_1)
  71. destroy(this.st_3)
  72. destroy(this.st_2)
  73. destroy(this.st_1)
  74. end on

  75. type st_4 from statictext within w_demo1
  76. integer x = 33
  77. integer y = 886
  78. integer width = 457
  79. integer height = 74
  80. integer textsize = -12
  81. integer weight = 400
  82. fontcharset fontcharset = ansi!
  83. fontpitch fontpitch = variable!
  84. fontfamily fontfamily = swiss!
  85. string facename = "Arial"
  86. long textcolor = 33554432
  87. long backcolor = 16777215
  88. boolean focusrectangle = false
  89. end type

  90. type mle_msg from multilineedit within w_demo1
  91. integer x = 530
  92. integer y = 179
  93. integer width = 1108
  94. integer height = 461
  95. integer taborder = 20
  96. integer textsize = -12
  97. integer weight = 400
  98. fontcharset fontcharset = ansi!
  99. fontpitch fontpitch = variable!
  100. fontfamily fontfamily = swiss!
  101. string facename = "Arial"
  102. long textcolor = 33554432
  103. boolean hscrollbar = true
  104. boolean vscrollbar = true
  105. end type

  106. type sle_number from singlelineedit within w_demo1
  107. integer x = 530
  108. integer y = 694
  109. integer width = 457
  110. integer height = 106
  111. integer taborder = 10
  112. integer textsize = -12
  113. integer weight = 400
  114. fontcharset fontcharset = ansi!
  115. fontpitch fontpitch = variable!
  116. fontfamily fontfamily = swiss!
  117. string facename = "Arial"
  118. long textcolor = 33554432
  119. string text = "1"
  120. end type

  121. type sle_name from singlelineedit within w_demo1
  122. integer x = 530
  123. integer y = 38
  124. integer width = 1108
  125. integer height = 106
  126. integer taborder = 10
  127. integer textsize = -12
  128. integer weight = 400
  129. fontcharset fontcharset = ansi!
  130. fontpitch fontpitch = variable!
  131. fontfamily fontfamily = swiss!
  132. string facename = "Arial"
  133. long textcolor = 33554432
  134. end type

  135. type cb_1 from commandbutton within w_demo1
  136. integer x = 530
  137. integer y = 861
  138. integer width = 457
  139. integer height = 128
  140. integer taborder = 10
  141. integer textsize = -12
  142. integer weight = 400
  143. fontcharset fontcharset = ansi!
  144. fontpitch fontpitch = variable!
  145. fontfamily fontfamily = swiss!
  146. string facename = "Arial"
  147. string text = "QQ发送"
  148. end type

  149. event clicked;ULong  ll_handle
  150. string ls_null
  151. long ll_num

  152. setNull(ls_null)

  153. ll_handle = FindWindowA(ls_null,sle_name.text)
  154. st_4.text = string(ll_handle)
  155. if ll_handle > 0 then  
  156.         ShowWindow(ll_handle, 9)
  157.         for ll_num = 1 to long(sle_number.text)
  158.                 //        内容复制剪切板
  159.                 clipboard(mle_msg.text)
  160.                 //将剪切板中内容填充到窗口中
  161.                 SendMessageA(ll_handle, 770, 0, 0)
  162.                 //模拟回车
  163.                 SendMessageA(ll_handle, 256, 13, 0)
  164.         next
  165. end if

  166. end event

  167. type st_3 from statictext within w_demo1
  168. integer x = 37
  169. integer y = 694
  170. integer width = 457
  171. integer height = 106
  172. integer textsize = -12
  173. integer weight = 400
  174. fontcharset fontcharset = ansi!
  175. fontpitch fontpitch = variable!
  176. fontfamily fontfamily = swiss!
  177. string facename = "Arial"
  178. long textcolor = 33554432
  179. long backcolor = 16777215
  180. string text = "次数:"
  181. alignment alignment = right!
  182. boolean focusrectangle = false
  183. end type

  184. type st_2 from statictext within w_demo1
  185. integer x = 37
  186. integer y = 42
  187. integer width = 479
  188. integer height = 106
  189. integer textsize = -12
  190. integer weight = 400
  191. fontcharset fontcharset = ansi!
  192. fontpitch fontpitch = variable!
  193. fontfamily fontfamily = swiss!
  194. string facename = "Arial"
  195. long textcolor = 33554432
  196. long backcolor = 16777215
  197. string text = "好友名-群名:"
  198. alignment alignment = right!
  199. boolean focusrectangle = false
  200. end type

  201. type st_1 from statictext within w_demo1
  202. integer x = 37
  203. integer y = 176
  204. integer width = 457
  205. integer height = 106
  206. integer textsize = -12
  207. integer weight = 400
  208. fontcharset fontcharset = ansi!
  209. fontpitch fontpitch = variable!
  210. fontfamily fontfamily = swiss!
  211. string facename = "Arial"
  212. long textcolor = 33554432
  213. long backcolor = 16777215
  214. string text = "内容:"
  215. alignment alignment = right!
  216. boolean focusrectangle = false
  217. end type

复制代码
20201205_121937.gif
共享共进共赢Sharing And Win-win Results
SYBASEBBS - 免责申明1、欢迎访问“SYBASEBBS.COM”,本文内容及相关资源来源于网络,版权归版权方所有!本站原创内容版权归本站所有,请勿转载!
2、本文内容仅代表作者观点,不代表本站立场,作者自负,本站资源仅供学习研究,请勿非法使用,否则后果自负!请下载后24小时内删除!
3、本文内容,包括但不限于源码、文字、图片等,仅供参考。本站不对其安全性,正确性等作出保证。但本站会尽量审核会员发表的内容。
4、如本帖侵犯到任何版权问题,请立即告知本站 ,本站将及时删除并致以最深的歉意!客服邮箱:admin@sybasebbs.com
wlfriend

主题

0

回帖

806

积分

高级会员

积分
806
贡献
在线时间
小时
2021-8-11 20:56:17 | 显示全部楼层
这个端口你是怎么发现的。
共享共进共赢Sharing And Win-win Results
您需要登录后才可以回帖 登录 | 站点注册

本版积分规则

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com

QQ|Archiver|PowerBuilder(PB)BBS社区 ( 鲁ICP备2021027222号-1 )

GMT+8, 2024-11-21 23:50 , Processed in 0.032019 second(s), 12 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表