Set Password

Asked by Hossain Abeer on 2017-07-16


I am trying to set password on starting the program. It would prompt a window, ask for a password, then do its operations. I have used the following commands:

yes = popAsk("PassWord?", "Program")
if not yes:
    popup("Please enter Valid password", "Program")

ok = input("Enter Validity Code:", "15-digit code", "Program")
input = (" ")
if not ok:

popup("Program starts now!", "Program")

Problem: The program accepts just about anything on input, and lets anyone access.

Thank you for your time
Hossain Abeer

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

There is no logic in your program to validate the code that has been entered.

You need to compare the entered value with the desired password, something like

if ok != "TheHiddenSecret":

see also

Can you help with this problem?

Provide an answer of your own, or ask Hossain Abeer for more information if necessary.

To post a message you must log in.