akdoto Posted February 12, 2019 Share Posted February 12, 2019 I am looking for something that can add individual numbers in multiple selected individual text objects. For example one line is shown as (30) + ((2)) and another is shown as (45). The sum would be 77. The + is not in relation to actually adding the numbers it is shown on my drawings as extra material provided. Everything I have found is unable to differentiate if there are multiple individual numbers in a single text line. I have hundreds of these lines with numbers, something that would allow mass selection is also needed. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 12, 2019 Share Posted February 12, 2019 A single line of text abc123fg56kl78 you can look at every character 1 at a time and what you do is check its ascii keycode. Type (asccii "0") then (ascii "9") so the range is 48-57 so the test is greater than 47 and less than 58 Ok keywords Strlen (strlen "abc123fg56kl78") use with repeat Ascii (ascii txtchr) Substr (substr "abc123fg56kl78" x 1) where X starts at 1 keep increasing and checking is it a number If not a number then save string of numbers 123 to a list ("123" "56" "78") Keep checking within repeat Do your thing with the list Quote Link to comment Share on other sites More sharing options...
pBe Posted February 12, 2019 Share Posted February 12, 2019 (edited) it would be interesting to see the actual line of text you're referring to akdoto Edited February 12, 2019 by pBe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.