-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks for the inspiration and code! #21
Comments
Hey Mike,
Wow! Using one script to manage a bunch of different utilities, all in
Python, is a brilliant idea. Are you familiar with AutoHotKey? I currently
use it for a bunch of simple keyboard commands and text replacement, like
opening apps and replacing shortcuts like "dmail" with my email.
Up until a couple months ago when I mainly used Linux, I used a Python
program called AutoKey that was pretty useful for running Python scripts
based on text and keyboard shortcuts. But when I switched to Windows, it
was pretty annoying to have to rewrite and relearn how to do things with
AutoHotKey's scripting language.
But it might actually be pretty interesting to do more things with just
Python, especially since Python is a lot easier to both read and write. And
being able to import modules and stuff can definitely make Python
automation really powerful: we can access and set clipboard, work with
files and images, launch programs or search for things. And there's
definitely a ton of other automation that would be nice to trigger with a
keyboard shortcut without having to open a terminal and run a command or
something, maybe even like screenshotting, or using OCR with tesseract. I
remember one use case was signing into to Google Colab: each time, it
requires running some code, opening a new tab, copying a key, and pasting
back into a jupyter notebook -- using some PySimpleGUI keyboard commands
(basically just spamming tab and enter), I could just use a keyboard
shortcut to automatically sign in (I'm lazy and don't like repeatedly
clicking things).
Like you've already started doing, there's definitely a ton of creative
things to do with text as well! I had some basic shortcuts for changing
highlighted text to all caps, or title case, or aLtErNaTiNg CaSe (didn't
end up using these that frequently though). But ranging from autocorrect to
quickly selecting and searching bugs thrown in code, there's definitely a
ton of possibility with keyboard shortcuts and Python!
Thank you for everything as well, and best of luck!!
~David
…On Tue, Jul 20, 2021 at 9:33 AM PySimpleGUI ***@***.***> wrote:
Hiya David. I wanted to take a moment to say "thank you" for being an
inspiration and also for providing code that I used to make a new
PySimpleHotKey program.
It's far from perfect, but it's turning out to be making a big impact
already on my efficiency and abilities.
It's one thing to have a hotkey program that enables you to launch
programs, etc, but it's entirely different when you've got complete control
of that program and the actions. Being able to call PySimpleGUI code
directly from the HotKey manager is AWESOME. Same with being able to
control how it operates in the system tray.
There's a public version of it posted, and there's a private version I
use. This is the private table settings that I'm using:
# Defintions of the hotkeys
DOCSTRING_SHORTCUT = 'ctrl+alt+shift+d'
DOCSTRING_TYPES_SHORTCUT = 'ctrl+alt+shift+f5'
KOLYA_SHORTCUT = 'alt+shift+k'
MILKA_SHORTCUT = 'ctrl+alt+shift+m'
POPUP_SHORTCUT = 'ctrl+alt+shift+f6'
# Special keys for PySimpleGUI to take action
POPUP_EMOJIS = '-POPUP EMOJIS-'
# dictionary that maps a hotkey to an action
hotkey_dict = {
DOCSTRING_SHORTCUT : (lambda : sg.execute_py_file(r'DocstringTools\AlignDocstrings.py', '--clipboard', cwd='.')),
DOCSTRING_TYPES_SHORTCUT : (lambda : sg.execute_py_file(r'DocstringTools\AddTypesToDocstring.py', cwd='.')),
KOLYA_SHORTCUT: (lambda: keyboard.write('Коля')),
MILKA_SHORTCUT: (lambda: keyboard.write('Милка')),
POPUP_SHORTCUT: (lambda: show_popup_at_cursor(POPUP_EMOJIS))
}
You did a fantastic job of showing me a nice design pattern as well as
providing a way to specify and parse the keystrokes.
I'm using this program to:
- Insert text
- Launch some utilities that work on the clipboard
- Show a simple emoji chooser (sort of like pingmote, but much more
direct)
The point I want to make is that anyone, regardless of skill level, can be
a contributor to the greater good of the programming world. You don't have
to be someone with decades of experience to have a substantial and positive
impact. You did this with your pingmote program. Thank you for creating it
and making it available to everyone.
I'll close with an example of your hotkey inspired emoji chooser that was
used to add the little guy at the bottom:
[image: 46rLq4V29z]
<https://user-images.githubusercontent.com/46163555/126332877-f94318e2-e8f3-496a-80aa-c56e75e0ca3e.gif>
[image: image]
<https://user-images.githubusercontent.com/46163555/126332841-69293287-4d81-4db7-8b6a-f6b8bc478371.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#21>, or unsubscribe
</~https://github.com/notifications/unsubscribe-auth/AI7N4FGMDIGJ7AHTTUHGES3TYV3KRANCNFSM5AV2CBIQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hiya David. I wanted to take a moment to say "thank you" for being an inspiration and also for providing code that I used to make a new PySimpleHotKey program.
It's far from perfect, but it's turning out to be making a big impact already on my efficiency and abilities.
It's one thing to have a hotkey program that enables you to launch programs, etc, but it's entirely different when you've got complete control of that program and the actions. Being able to call PySimpleGUI code directly from the HotKey manager is AWESOME. Same with being able to control how it operates in the system tray.
There's a public version of it posted, and there's a private version I use. This is the private table settings that I'm using:
You did a fantastic job of showing me a nice design pattern as well as providing a way to specify and parse the keystrokes.
I'm using this program to:
The point I want to make is that anyone, regardless of skill level, can be a contributor to the greater good of the programming world. You don't have to be someone with decades of experience to have a substantial and positive impact. You did this with your pingmote program. Thank you for creating it and making it available to everyone.
I'll close with an example of your hotkey inspired emoji chooser that was used to add the little guy at the bottom:
The text was updated successfully, but these errors were encountered: