← Back to team overview

sikuli-driver team mailing list archive

[Question #235379]: how to copy part of a string

 

New question #235379 on Sikuli:
https://answers.launchpad.net/sikuli/+question/235379

Hi,

I need to copy a string and paste it in other page.

This is my task:

Copy an IC number from "ready to perso" page and paste it in "update perso status" page

The thing is, this IC number in "ready to perso" page is like this 901210-01-5127, 
but then I need to paste it in "update perso status" page 901210015127 (without the '-' symbol) 

I tried to use :

click(("ICnumber.png")targetOffset(189, -3))
    type('a', KeyModifier.CTRL)
    type('c', KeyModifier.CTRL)
    click("close.png")
    click("updatePersoStatus.png")
    type('v', KeyModifier.CTRL)

but this does not work because the text box in "update perso status" page is only receive 12 alpha/numeric character.

so how to copy the number without the '-' symbol? 

Thanks.



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.