The first step is to create a script that generates a random number that you can use for the age of the user.
Dim rand As New Random() Dim TSrandomAge As Integer = rand.Next(10000, 99999) MsgBox(TSrandomAge)
Dim TSrandomAge As Integer = rand.Next(MinVal, MaxVal)
Dim MinVal=16 Dim MaxVal=105
Public Sub Main() Dim rand As New Random() Dim MinVal=16 Dim MaxVal=105 Dim TSrandomAge As Integer = rand.Next(MinVal, MaxVal) MsgBox(TSrandomAge) End Sub
Public Sub Main(args As IDictionary(Of String, Object)) Dim MinVal=args ("MinVal") Dim MaxVal=args ("MaxVal")where "MinVal" and "MaxVal" are the names of the input parameters that we will create in the next procedure.
Public Sub Main(args As IDictionary(Of String, Object)) args ("TSrandomAge")=TSrandomAgewhere "TSrandomAge" is the names of the output parameters that we will create in the next procedure.
'MsgBox(TSrandomAge)
Public Module Main Dim _desktop As Desktop = Agent.Desktop Public Sub Main(args As IDictionary(Of String, Object)) Dim rand As New Random() Dim MinVal= args("MinVal") Dim MaxVal= args("MaxVal") Dim TSrandomAge As Integer = rand.Next(MinVal, MaxVal) args ("TSrandomAge")=TSrandomAge 'MsgBox(TSrandomAge) End Sub End Module
Next, define the script input and output parameters used to pass the random age to the visual test.