I want to download all my iTunes purchase history as a neatly tabulated text file.
For that, I need to write a GUI script that I will run through all the batch pages of my purchase history, in my account.
The data that I seek is contained in a class called ‘static text’. For every page, I just need to get all values of static texts from x to y, where x and y are integers.
My problem is to figure out x, which can vary from page to page and from session to session due to various circumstances. However, what never varies is that ‘static text x’ is always preceded by the static text whose value is “Total Price”.
Although I can identify the static text whose value is “Total Price”, I don’t know how to get its position relative to x, which would be x-1 and would easily enable me to get x.
More generally, my question is:
How do I get the position index of any object within all its siblings of the same class, at the same containment level?
For instance, if I do
tell application "Finder" to set the_file to file 3 of desktop
how do I get back to 3 from the_file?
I hope I have been clear, and I thank in advance those who will point me the right direction.