0

Okay, my first question is about wxpython's registerhotkey.
As far as I can find, there are not letter key keycodes.
This example relies on the win32con module:

def regHotKey(self):
"""
This function registers the hotkey Alt+F1 with id=100
"""
self.hotKeyId = 100
self.RegisterHotKey(
self.hotKeyId,
win32con.MOD_ALT,
win32con.VK_F1) -- I want to be able to replace this with a letter key. Is there any way to do that, or am I stuck with whatever keycodes are provided by win32con?


And my second question is completely unrelated. I am using os.system(command) to start command line commands. Would it be faster or more efficient if I used os.startfile(command.bat) where command.bat contains the commands, or maybe os.system('start command.bat')?

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Paul Thompson
0

Im thinking that you might be stuck, they would only have a few letter codes if they only supported a few. I couldn't find a way around it.

And for the system question, i generally use startfile but i think its much of a muchness as to which is faster. I think there is a way to time the functions... search "timing" in this forum. That might get you a way to do it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.