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

Hi there,
I started sikulix very very recently and have no programming knowledge. I have 
written a small script using built-in sikulix windows operations like click 
<screenshot>, type ("xxxxxx"), click <screenshot> ,wait,click <screenshot>. It 
may not be the the most efficient script, but it helps.

It works, when I have my password pre-populated in the script itself.  But I 
plan to share my script with my pals as an exe, and they each have a different 
password (obviously). 

so the issue is:  Instead of pre-populating the password text in the script, 
I'd like to input that filed into the pop-up box which comes up during the 
running of script, by using a locally stored text file (or any file).  

PS: I tried the solution provided in 
https://answers.launchpad.net/sikuli/+question/204153, but inserting the below 
snippet at line3 (by replacing my original line Type ("xxxxx").  I get an 
error. 

*** working script:

click( screenshot )
click (Screenshot)
type("xxxxxx")
click (screenshot)
wait(2)
click(Screenshot)

*** Script to replace pre-populated password line 
click( screenshot )
click (Screenshot)

import ConfigParser
config = ConfigParser.ConfigParser()
config.read('config.ini')
password = config.get('user1','password')

click (screenshot)
wait(2)
click(Screenshot)


>>config.ini file
user1
password = xxxxxx

Please may I know how to achieve this?

Thank you.


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to