How to Retrieve an Integer from a StyledText object?
Not sure how the control look likes, but you can try getString(), getName() function from your StyledText object.
If above doesn't helps, Share some snapshots of Object and its properties and methods
if i understood correctly, then the question is on Type Casting, if so, get the text first SWTObject(StyledText), via getText() or object.ContetnText
stringContent = object.contentText()
intContent = parseint(stringContent) //in Java script, if VB Script use cint(stringContent)
intContent will contain the integer.
If the requirement is to fetch partial text like "content_001" then we have to make use of substring and then type casting.