Я пытаюсь использовать функцию добавления копий для копирования сотен экранов из AS400.Это позволяет мне «Копировать приложение» примерно на 33 экранах перед остановкой.Я использую макрос VBScript для копирования и навигации.(показано ниже) Есть ли способ скопировать и добавить дополнительные экраны?Видите ли вы что-то не так с моим кодом или можете предложить другой подход?
Спасибо, Гордон
[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