How do I capture the value in a particular column from my application?
My screen looks like this:
Col1 Col2 Col3
col1value col2value col3value
I need to capture the value in col3value.
I am thinking of using GetWindowTextEx>Title*,Getvalues. But this will capture everything in the screen?
Should I store the result in an array and loop to find the value I am looking for?
I am always looking for a particular column value. that does not change.
Thanks.
How to capture a column value from my application?
Moderators: Dorian (MJT support), JRL
One possible method is to click in the first column always,and then
just push the tab key the required number of times to focus the correct column.
Then depending upon the application, highlight the cell contents and issue a Ctrl-c to copy the value to the clipboard. Then a getclipboard command retrieves it and puts it in a variable.
To get the cell to highlight, sometimes it works to send Ctrl-a (select all), and sometimes it works to send a space character, and sometimes a double click works. Do it yourself manually first to see what works, before you start coding the script.
just push the tab key the required number of times to focus the correct column.
Then depending upon the application, highlight the cell contents and issue a Ctrl-c to copy the value to the clipboard. Then a getclipboard command retrieves it and puts it in a variable.
To get the cell to highlight, sometimes it works to send Ctrl-a (select all), and sometimes it works to send a space character, and sometimes a double click works. Do it yourself manually first to see what works, before you start coding the script.
Thanks for your reply.
However, I cannot select one column value at a time, even using tab. A tab and copy will select the entire row, not a particular column value.
What I've is a single row with 9 column values. The column values are not editable. I am looking to retrieve the 8th column value. I tried GetTextInRec and it works, however the downside is I need to pass the cursor position and I do not want to hard code that value.
However, I cannot select one column value at a time, even using tab. A tab and copy will select the entire row, not a particular column value.
What I've is a single row with 9 column values. The column values are not editable. I am looking to retrieve the 8th column value. I tried GetTextInRec and it works, however the downside is I need to pass the cursor position and I do not want to hard code that value.
Get the entire row into a variable.
Then separate it into it's component parts.
What is the delimiter? one or more spaces? comma?
Use the Separate command
and then trim the individual variables if needed to
get rid of extra spaces.
Here is one way to trim off excess spaces
VBEval>Trim("%trimthis%"),result
Then separate it into it's component parts.
What is the delimiter? one or more spaces? comma?
Use the Separate command
and then trim the individual variables if needed to
get rid of extra spaces.
Here is one way to trim off excess spaces
VBEval>Trim("%trimthis%"),result