Compare Looping Variables?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Macro Veteran
Posts: 154
Joined: Thu Jan 10, 2008 10:25 am
Location: London, UK

Compare Looping Variables?

Post by RNIB » Tue Sep 12, 2017 1:39 pm

Not too sure on the best way to describe this but...

I have a window that shows a list of files used in a particular program. This list is in columns a bit like those in Windows Explorer which show file properties etc. One of these columns is called Description and will be either empty or contain the letter s or r.

I need to check the following:

1. That the first file in the list has a description containing s
2. That the last file in the list has a description containing r
3. That only one file is marked with an s
4. That only one file is marked with an r

The number of files in the list will vary but the number of files are captured earlier in the script as the variable WavCount1.

This is my code at the moment, I've not tested it yet.

Code: Select all

//Copy Description of all tracks
//Navigate to the description field and copy it's contents
Press Tab *7
Press Ctrl
Release Ctrl
//Navigate back to the list and select the next one
Press Tab
Press Down
//Compare the values of the descriptions
Hopefully that will copy all the description fields for all the files in the list. So if there were three files hopefully I'd end up with the variables:

Checking that description 1_0 contains an s is easy as is checking that description_2 contains an r

But I can't get my head around how to check all the other files for an s and an r when the number of variables is going to be different.

Essentially what I want is something like:
MessageModal>There are two files with the same description
MessageModal>All file descriptions are correct

but for that to continue for all variables and to check for the r description to.

Post Reply