Numbers converted to String type into another application backwards

Asked by Q17

Hi,

I have used the following code to iterate a column and get the value, but when is typing into another app the numbers are backwards like 0001 instead 1000.

sum = sheet.col_values(2)
i = 0
for rows in sheet.col(2):
    type(Region(219,542,78,24), str(sum)[i])
    i += 1

On Sikuli message log is showing:

[log] TYPE "["
[log] CLICK on L(258,554)@S(0)[0,0 1920x1080] (528 msec)
[log] TYPE "1"
[log] CLICK on L(258,554)@S(0)[0,0 1920x1080] (520 msec)
[log] TYPE "0"
[log] CLICK on L(258,554)@S(0)[0,0 1920x1080] (546 msec)
[log] TYPE "0"
[log] CLICK on L(258,554)@S(0)[0,0 1920x1080] (546 msec)
[log] TYPE "0"

Question information

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

type(someLocation, text)

first clicks at someLocation (which defines the position, where the text is inserted) and then issues the typing of the given text.

Since in your case every single character is inserted at the same click position, you get this effect.

I do not understand your complexity here:

click(someCell)
type(str(sum))

should do what you want.

Revision history for this message
Q17 (squery) said :
#2

Thanks I did try your suggestion but the result is the same.

Revision history for this message
Q17 (squery) said :
#3

Thanks RaiMan, that solved my question.