You have to login in order to post a reply to this topic.

1 reply [Last post]
eduoil
User offline. Last seen 1 year 42 weeks ago. Offline
Joined: 04/14/2010
Posts: 1

how can i specify the index of a list variable when the index is stored on another variable?

my variable is %password% and my index i have it stored in %counter%

i tried %password[%counter%]% but gives me a sysntax error

what am trying to do is a script that changes my passwords automatically at noon every day, passwords are store in a txt file and i store the index(las password i used) in text file called counter.txt,, so when the job is trigered the first thing i do is assing the contents of the password textfile to %password% and index.txt to %counter%

but how do i retrieve the new password?

Andrew
Andrew's picture
User offline. Last seen 1 year 24 weeks ago. Offline
Joined: 03/12/2010
Posts: 33
Re: List Variable index

Try %password[counter]%.  If I understand correctly, the actual variable in WinAutomation is stored as text; the percent notation tells WinAutomation to "evaluate the expression until I encounter another percent sign."  The test I ran that worked is attached.

AttachmentSize
Get List Item Variable Index.waj 14 KB