WinAutomation - windows automation software with macro recorder
      1 reply [Last post]
      eduoil
      User offline. Last seen 20 weeks 6 days 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 3 weeks 4 days 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