以下の例は、メモ帳アプリケーションをテストする親スクリプトと子スクリプト間でリスト パラメータを作成して渡す方法を示しています。
Public Module Main Dim _desktop As Desktop = Agent.Desktop Public Sub Main() Dim numList As New List(Of Integer) For i As Integer = 0 To 10 numList.Add(i) Next Dim args As New Dictionary(Of String, Object) args("Numbers") = numList Workbench.RunScript("ChildScriptArgs", args) End Sub End Module
Public Module Main Dim _desktop As Desktop = Agent.Desktop Public Sub Main(args As IDictionary(Of String, Object)) Dim nums As List(Of Integer) = args("Numbers") With _desktop.Window("/Window[@caption='Untitled - Notepad']") For Each num As Integer In nums .TextField().TypeKeys(num.ToString() + "<Enter>") Next End With End Sub End Module