Sign in to follow this  
Followers 0
Ram

Array to textField

4 posts in this topic

I am trying to call the array of data to the textField... but I get an Error.

Here is what I have done

Dim $arrA[7] = [6, 'Peter', 'Robert', 'Roger', 'Andrew', 'Nick', 'Van']

Run("C:\Visual Studio 2005\Projects\WindowsApplication2\bin\Debug\WindowsApplication2.exe")

WinWait("Form1")

For $i = 1 To $arrA[0]

ControlSetText("Form1", "", "WindowsForms10.EDIT.app.0.378734a1", $arrA)

ControlFocus("Form1","","WindowsForms10.BUTTON.app.0.378734a1")

ControlClick("Form1", "", "WindowsForms10.BUTTON.app.0.378734a1")

Next

and when run above script I get

Line 8 (File....):

ControlSetText("Form1", "", "WindowsForms10.EDIT.app.0.378734a1", $arrA)

ControlSetText("Form1", "", "WindowsForms10.EDIT.app.0.378734a1", $arrA[^ ERROR

Error: Error parsing function call.

Can you let me know whatz wrong? because as far as I know array can contain characters, number anything..and text field is also the same. why do I get "Error parsing function call."

Awaiting your response!

Share this post


Link to post
Share on other sites



you need the $ charactor...arrA It should be arrA[$i]

Share this post


Link to post
Share on other sites

$i

mistake.

:-)

Share this post


Link to post
Share on other sites

I am really not sure how is forgot a $ near i :)

Anyways Thanks a lot!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0