We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
You can convert that number to a string
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqconvert/index.html
then pick the string apart for your coordinates
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/index.html
Then convert the separate coordinates back to numbers using aqconvert again.
Try the examples and then with your numbers and let us know if you get stuck.
You can convert that number to a string
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqconvert/index.html
then pick the string apart for your coordinates
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/index.html
Then convert the separate coordinates back to numbers using aqconvert again.
Try the examples and then with your numbers and let us know if you get stuck.
Hello,
Thank you for the right path. Now my code looks like this:
function VariablesTest()
{
var Znr = Project["Variables"]["Znr"]("Znr");
for (var i = 0; i < aqString["GetLength"](Znr); i++)
Log["Message"]( aqString["GetChar"](Znr, i) );
}
And the output looks like this:
I got stuck and try to understand how can I take the first, second and third digits separately and click the desired coordinates for each of them.
Really appreciate your help.
I have tried to do something like this, but i ended up pressing just the first coordinate:
function VariablesTest()
{
var window = Aliases["UvsSco"]["HwndSource_Window"]["Window"];
var richTextBox = window["exclusivecontrolled_localattendant_localattendanttexts_attenderrortext"];
var Znr = Project["Variables"]["Znr"]("Znr");
for (var i = 0; i < aqString["GetLength"](Znr); i++)
Log["Message"]( aqString["GetChar"](Znr, [1]) );
if(Znr, [1] == '1')
richTextBox["Click"](97, 87); //1
else if (Znr, [1] == '2')
richTextBox["Click"](151, 86); //2
else if (Znr, [1] == '3')
richTextBox["Click"](210, 85); //3
else if (Znr, [1] == '4')
richTextBox["Click"](97, 128); //4
}
Edit:
Found my mistake:
Instead of if(Znr, [1] == '1'), replaced with if( aqString["GetChar"](Znr, [1]) == '1')
and clicks the button I need. Thank you again for the right path !