Im trying to pull out values from an array.

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

Im trying to pull out values from an array.

Post by Alpha_AI » Tue Nov 13, 2007 10:12 am

Here it is:

This is how i store values into an array

ArrayIndex starts off at one and repeats until arrayindex is > 3

Let>CountryName[ArrayIndex]=%country_name%
Let>CityName[ArrayIndex]=%city_name%
Let>Countyname[ArrayIndex]=%county_name%
Let>ContactName[ArrayIndex]=%SPAN6%
Let>ContactNumber[ArrayIndex]=%SPAN7%

and this is how im retrieving it

SEND>CountryName[%ArrayIndex%]
PRESS TAB
Send>CityName[%ArrayIndex%]
PRESS TAB
Send>Countyname[%ArrayIndex%]
PRESS TAB
Send>ContactName[%ArrayIndex%]
PRESS TAB
Send>ContactNumber[%ArrayIndex%]

but it always sends to excel and not the proper value of the array

CountryName[0]
CityName[0]
CountyName[0]
ContactName[0]
ContactNumber[0]

I still dont know how the assignment operators work properly.

Ben

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Nov 13, 2007 10:32 am

Let>sendValue=CountryName[%ArrayIndex%]
Send>sendValue
Press Tab
etc
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts