Skip to content

Is pastage of text when a configurable duration of time has elapsed supported? #724

Answered by Elliria
RokeJulianLockhart asked this question in Q&A
Discussion options

You must be logged in to vote

You can use time.sleep() to insert a delay into your code, specifying the amount of time in seconds. Below is a basic example that prints a line of text, waits 3 seconds, and prints another line of text:

# Print the specified text:
keyboard.send_keys("This prints immediately.")

# Insert a three-second delay:
time.sleep(3)

# Print the specified text:
keyboard.send_keys('This prints after 3 seconds.')

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@RokeJulianLockhart
Comment options

@Elliria
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by RokeJulianLockhart
Comment options

You must be logged in to vote
2 replies
@RokeJulianLockhart
Comment options

@josephj11
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants