下面的代码复制从app1(第1列第1行到第5列第5列)中选择的数据,并将其粘贴到app2中的指定字段中(通过鼠标坐标)。 有4列,每列有5行,第1列有4行。 数组可能是执行此复制/粘贴练习的最佳方法。理想情况下,可以先将来自应用程序1的数据转储到剪贴板中,然后粘贴到app2中的各个字段中。 感谢您在优化我当前的原始代码方面的帮助。
谢谢
^Home::
;Column1
WinActivate, app1
SendEvent {Click 400, 510, down}{click 500, 510, up}
Send ^c
WinActivate, app2
Click, 800, 545
Send ^v
WinActivate, app1
SendEvent {Click 400, 550, down}{click 500, 550, up}
Send ^c
WinActivate, app2
Click, 800, 585
Send ^v
WinActivate, app1
SendEvent {Click 400, 590, down}{click 500, 590, up}
Send ^c
WinActivate, app2
Click, 800, 625
Send ^v
WinActivate, app1
SendEvent {Click 400, 630, down}{click 500, 630, up}
Send ^c
WinActivate, app2
Click, 800, 665
Send ^v
;Column2
WinActivate, app1
SendEvent {Click 590, 480, down}{click 700, 480, up}
Send ^c
WinActivate, app2
Click, 800, 810
Send ^v
WinActivate, app1
SendEvent {Click 590, 520, down}{click 700, 520, up}
Send ^c
WinActivate, app2
Click, 800, 850
Send ^v
WinActivate, app1
SendEvent {Click 590, 560, down}{click 700, 560, up}
Send ^c
WinActivate, app2
Click, 800, 890
Send ^v
WinActivate, app1
SendEvent {Click 590, 600, down}{click 700, 600, up}
Send ^c
WinActivate, app2
Click, 800, 930
Send ^v
WinActivate, app1
SendEvent {Click 590, 640, down}{click 700, 640, up}
Send ^c
WinActivate, app2
Click, 800, 970
Send ^v
;Column3
WinActivate, app1
SendEvent {Click 780, 480, down}{click 890, 480, up}
Send ^c
WinActivate, app2
Send {PgDn}
Sleep, 500
Click, 800, 380
Send ^v
WinActivate, app1
SendEvent {Click 780, 520, down}{click 890, 520, up}
Send ^c
WinActivate, app2
Click, 800, 420
Send ^v
WinActivate, app1
SendEvent {Click 780, 560, down}{click 890, 560, up}
Send ^c
WinActivate, app2
Click, 800, 460
Send ^v
WinActivate, app1
SendEvent {Click 780, 600, down}{click 890, 600, up}
Send ^c
WinActivate, app2
Click, 800, 500
Send ^v
WinActivate, app1
SendEvent {Click 780, 640, down}{click 890, 640, up}
Send ^c
WinActivate, app2
Click, 800, 540
Send ^v
;Column4
WinActivate, app1
SendEvent {Click 1160, 480, down}{click 1270, 480, up}
Send ^c
WinActivate, app2
Click, 800, 730
Send ^v
WinActivate, app1
SendEvent {Click 1160, 520, down}{click 1270, 520, up}
Send ^c
WinActivate, app2
Click, 800, 770
Send ^v
WinActivate, app1
SendEvent {Click 1160, 560, down}{click 1270, 560, up}
Send ^c
WinActivate, app2
Click, 800, 810
Send ^v
WinActivate, app1
SendEvent {Click 1160, 600, down}{click 1270, 600, up}
Send ^c
WinActivate, app2
Click, 800, 850
Send ^v
WinActivate, app1
SendEvent {Click 1160, 640, down}{click 1270, 640, up}
Send ^c
WinActivate, app2
Click, 800, 890
Send ^v
return