通过个人交流创建和调用数组



我正在尝试在个人通信中调用数组(iSeries等)我有一个应该

的脚本
Open the query screen
Run query 1
Wait for query 1 to finish
Run query 2

etc

在任何其他VB情况下,我都会使用

Dim qryArray() as string = {“salesrep1”, “salerep28”, “salepay34”, “prod_inv_1”}

,但这里一直告诉我Expected end of statement

我这里有明显的事情吗?

其次,我需要知道如何将数组称为SendKeys

'Open Query
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "2" 'Run
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys 'Query Name Goes Here
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[field+]" 'Next
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "techops" 'Library
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[field+]" 'To top
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]" 'Go to query
    autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf3]" 'Exit to run query

因此,在Natha_sav的帮助下,这是工作答案:

For each v in qryArray
'Then we are opening the query, running it, closing it and waiting for the message to confirm
'snippet:
autECLSession.autECLPS.SendKeys "2" 'Run
   autECLSession.autECLPS.SetCursorPos 8, 26
autECLSession.autECLPS.SendKeys(cstr(v)) 'send query name
   autECLSession.autECLPS.SetCursorPos 9, 28
'autECLSession.autECLPS.SendKeys "salesrep1" 'This would be the equivalent
'then close the library etc 
'run the query
next

相关内容

  • 没有找到相关文章

最新更新