← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #159564]: Neither type nor paste works for Java app

 

Question #159564 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/159564

eliteSKL posted a new comment:
disclaimer: RaiMan will be back
https://answers.launchpad.net/sikuli/+faq/1607 to answer your questions.
I am a noob that uses sikuli quite often. i would leave this open for
others for better input.


Answer 1: I sometimes use the fallowing:

type("r", KEY_WIN)                #on win xp opens the run box. i believe it's the same for win7
paste(r"C:\program files\program.exe")           #the 'r' is python syntax for raw string... no need for the escape charters.


@Question 2:
i'm not too sure about this one. I don't use the built in App() class. i usually snag a picture of some text on the logging boxes and do an off center click into the textbox. try making it a raw string, if you have special characters   type(r"logon_ID").

suggestion, create a new script to make sure you can on the quick and
dirty make a successful login.

type("r", KEY_WIN)                                           #on win xp opens the run box. i believe it's the same for win7
paste(r"C:\program files\program.exe")                 #the 'r' is python syntax for raw string... no need for the escape charters.
type(Key.
wait("pic_of_logon_screen", 120)                             #wait 2 mins, for the logon screen to come up.
click("pic_of_logon_screen").targetOffset(dx, dy)            #use pattern settings window to set this.
type(r"userID")                                                     <-- if those are variables don't use r" "
click("pic_of_logon_screen").targetOffset(dx, dy)        # use pattern settings window to set the location of the password box
type(r"password")                                                  <-- if those are variables don't use r" "

wait("picture_of_next_screen")


sorry i can't be of more help.

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