How to copy/store selected text/field in GUI scripting?

Hi!
If I have a piece of text selected via GUI scripting how do I store that in a variable?
Second, if a row is selected, how do I store the data from the columns?
Lastly, if a row is selected, how do I count the amount of additional rows?

Thanks!

The answers to all those questions depends entirely on what application you’re using and what the dictionary of that application supports.

What app are you using and what are you trying to accomplish? The more detail you can give us the better chance we can help you.

It is a non-scriptable app, hence the GUI scripting only option.
They keychain is not scriptable, specifically the trust settings.

Any thoughts?