我正在尝试使用copy append函数从AS400复制数百个屏幕。它只允许我在停止之前"复制附加"大约33个屏幕。我正在使用VBScript宏来进行复制和导航。(如下所示)有没有一种方法可以复制附加更多屏幕?你看到我的代码有什么问题吗?或者可以建议不同的方法吗?
谢谢,Gordon
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
dim pagectr, roll
pagectr = 1
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
Do
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "7"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[left]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "[down]"
autECLSession.autECLPS.SendKeys "5"
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLMacro "[edit-copyappend]"
autECLSession.autECLPS.SendKeys "[pf3]"
roll = 1
Do
if (roll = pagectr) then
exit do
end if
autECLSession.autECLPS.SendKeys "[roll up]"
roll = roll + 1
Loop
pagectr = pagectr + 1
REM Wait for 10 seconds = 10000 milliseconds
autECLSession.autECLPS.Wait 5000
Loop
end sub
[Client/iSeries/IBM i]访问可能会限制剪贴板的总大小。请参阅SO问题剪贴板大小限制的答案。
与直接访问应用程序后面的数据库相比,您真的需要屏幕抓取吗
中端系统的一大优势是能够直接访问数据库。
以下是一些让你开始的参考资料:
- Windows从中间层访问iSeries服务
- LinuxIBM i Access
- JavaJT400