sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37102
Re: [Question #287968]: How can i use sys.argv to Key
Question #287968 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/287968
Status: Open => Answered
RaiMan proposed the following answer:
s1 is a string containing the word ENTER, but in Key.xyz, xyz must be a
P(J)ython name.
the solution is to build the type() command as a string and then use
exec(), which tells P(J)ython to execute the command contained in the
string.
s1 = sys.argv[1]
exec("type(Key.%s)" % (s1))
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.