IBM iSeries AS400 VBscript设置值的数组

时间:2019-02-11 12:03:58

标签: vbscript ibm-midrange iseries-navigator

我希望缩短iSeries中潜在的VBscript。我需要自动化的是用户输入超过30个查询。我知道如何通过一种长方法来执行此操作,该方法涉及复制并粘贴相同的Do:Loop,直到清除一条消息为止,但是我需要这样做30次,并且有更多的潜力-因此复制+粘贴不会在这里感觉

下面是我的脚本

Do 'Start Loop
autECLSession.autECLOIA.WaitForAppAvailable
IF not (autECLSession.autECLOIA.MessageWaiting) Then 'If there is not a message waiting
    autECLSession.autECLPS.Wait(500) 'Wait 0.5 seconds
End If

Loop Until autECLSession.autECLOIA.MessageWaiting 'Keep going until there is a message waiting

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[sys attn]" 'Send the Response
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.Wait(2000) 'Wait 2 seconds
autECLSession.autECLPS.SendKeys "2" 'Select Messages

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]" 'Go to messages

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]" 'Exit messages

我有30个查询,查询的名称各不相同

"10"
[Enter]
"2"
[Tab]
~Query Name~
[Tab]
~Library Name~

如果在某种程度上有所帮助,则库将始终相同

我可以创建一个数组来存储查询名称并遍历它们直到完成(包括检查和清除消息)吗?

0 个答案:

没有答案
相关问题