Option in type() to suppress logging of typed strings
Closed this issue · 4 comments
ottonautti commented
I would like to be able to disable output to STDOUT when typing passwords to login prompts etc.
glitchassassin commented
Can you use Debug.off()
and Debug.on()
to temporarily switch off the logging output?
https://lackey.readthedocs.io/en/latest/lackey.html#lackey.DebugMaster.off
ottonautti commented
Can you use
Debug.off()
andDebug.on()
to temporarily switch off the logging output?https://lackey.readthedocs.io/en/latest/lackey.html#lackey.DebugMaster.off
I have tried it but I don't get the expected behaviour:
import lackey
def test_type():
print(lackey.Debug.__dict__)
np = lackey.App("Notepad")
np.focus()
lackey.type(np.window(), "my secret")
lackey.Debug.off()
test_type()
lackey.Debug.on(1)
test_type()
Outputs:
{'_debug_level': 0}
[action] Clicked at (Location object at (1440,523))
[action] Typing 'my secret' with modifiers 'None'
{'_debug_level': 1}
[action] Clicked at (Location object at (1440,523))
[action] Typing 'my secret' with modifiers 'None'
glitchassassin commented
Sorry, it's been a little while since I've looked at this.
Try disabling it with lackey.Settings.ActionLogs = False
.
ottonautti commented
Turning action logs off works. Thanks!