Well I have just started learning python and one of my first projects I have assigned is to find out every uniquely usable character (like the ones in my id) can be used in python. I would save them in file.

I am not very good at writing the code so i will just explain how i plan for my code to function

user sets value to start
ex x = 0
python takes this value and adds 1 to it and the outcome is the new value of x
then it presses and holds alt and then keys the value of x
and saves output to text file
then it loops back to where the value will be set again
the only part of the code i cannot figure out is how will I be able to get python hold down to alt and then press the numbers. Is it even possible?

Recommended Answers

All 2 Replies

Are you allowed to use other modules? If so use pygame. Look at the documentation at pygame.org under key. I'm pretty sure you can set modifier keys.

If its windows, try SendKeys module.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.