Dictionary Keys Changing

smibrandon

New member
How would you all suggest I handle the following situation:

1707068405481.png

In these two examples, the screen is being captured in the same scenario. However, as you can see on the unredacted entries, the index numbers change. When triggered, I want to capture the values between the parenthesis and assign them to their own local variable. So, in the left example, I want to capture both 0.2 and 14.5, and in the right example: 0.5 and 1.7. Any suggestions? Thanks in advance!
 

smibrandon

New member
Negative. It's carpeting an app. Which, interestingly enough, has other keys that are named and are therefore "static", in this sense.
 

hsurB

Well-known member
You could try runing action iterate dictionary/array and check which key contains words: 'trip' and 'away' and save these keys to use them later. Unless other keys also contains these words. Do they?
 
Last edited:

Endercraft

Moderator (& bug finder :D)
Negative. It's carpeting an app. Which, interestingly enough, has other keys that are named and are therefore "static", in this sense.
Could be a webview though.

If the captured content only has brackets in the strings you want it's easy to do.
 

MacroDroidDev

Administrator
Staff member
I would suggest you iterate all entries and use a regular expression to find/extract the fields that match the pattern you are after.
 

mapriex

Active member
you can also use "find text" and search for "trip" and "away", then use the found id and copy this as a new variable and use this value.
only requirement: the search-passkey: "trip" and "away" are unique values.
 
Top