How to calculate a value and type it using type method in sikuli java..

Asked by Vaishali

I m using eclipse,,, and i m typing the following lines in notepad..
for(i=0;i<3<i++)
{
s.type("<doc>\n<field name=\"Mid\">");
here i want to type the value of i in notepad....
s.type("</field>\n<field name=\"MobileName\">");
}
is there any way to do this...

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

looks rather complicated, what you are doing there.

Why don't you build the files directly, instead of taking the stony Sikuli way.
There are thousands of tools available, to create XML files.

Nevertheless:
s.type(""+i);

… but that is basic Java know how.

… and Java has String.format() and other utility classes around StringBuilder

Can you help with this problem?

Provide an answer of your own, or ask Vaishali for more information if necessary.

To post a message you must log in.