that definitely works in the right direction.
But I still cant figure out how to end up with the current active parameter name as 2nd part of the string ,
so say moving ‘hardness’, ‘color’, or ‘size’ slider would generate a string of “ID,par#,data” ,
parent().par.Par0 gives me the ID easily as first variable, but am at a loss as to following that with ‘Par1’, ‘Par2’ , or ‘Par3’ then its corresponding slider data,
so adjusting ‘hardness’ would generate something like ‘9,2,112’ (ID9,Par2,data from par2) food.9.toe (3.88 KB)
However, this will give you the full parameter name, and your textport output would read something like:
9 Par1 100
If you want to get a string’s trailing digits, you can use some extra python code such as what’s described here-- [url]Check what number a string ends with in Python - Stack Overflow. In this case, you’d be importing the re python module and calling the search method. For example:
Side note, to get the trailing digits on any string use:
digits(str)→ int or None:
Returns the numeric value of the last consecutive group of digits in the string, or None if not found. The search begins after the last slash if any are present.
tdu.digits(‘arm123’) # returns 123
tdu.digits(‘arm123/leg456’) # returns 456
tdu.digits(‘arm123/leg’) # returns None
Note this method will work on any string, but when given a specific operator, its more efficient to use its local digits member:
n = op(‘arm123/leg456’)
d = n.digits # returns 456