-
Notifications
You must be signed in to change notification settings - Fork 7
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
vocola interfacing with Autohotkey #2
Comments
Soti ***@***.***> writes:
have been using your bit bucket code for two years now and think it's
really awesome! Many thanks! However, I use Autohotkey a lot now and can't
find/understand how I can "interface vocola with Autohotkey" ? Could you
point me to the right extension/bit of your code that deals with this ?
Did you look at AutoHotkey.vch? https://github.com/mdbridge/bit-bucket/blob/master/voice/my_commands/commands/AutoHotkey.vch
It uses the Subprocess extension to invoke auto hot key at a known
location on my PC. For example usage, you can look at the switching
code in switch.vch:
~/voice/my_commands/commands/switch.vch:23:
#
# Switch to a given window or produce an error dialog box which fades
# after a few seconds.
#
SwitchTo(name) := SwitchTo2($name,
AutoHotkeyAsync3(async_message,
"SwitchTo", "$name: no such window found", 3)
Vocola.Abort());
The script being invoked here is at
https://github.com/mdbridge/bit-bucket/blob/master/voice/my_commands/AutoHotkey/async_message.ahk
It is also possible to invoke in already running AutoHotkey script
by its hotkey; e.g.:
# with volume.ahk, this should lower the volume:
invoke a AutoHotkey hotkey = Repeat(30, Keys.SendInput({win+alt+down})); # check
I hope this helps.
- Mark
|
soticoker
changed the title
vocola interfacing with Vocola
vocola interfacing with Autohotkey
Jan 15, 2023
Soti ***@***.***> writes:
however, I wonder if it's possible to call an AHK function from within
Vocola ?
I would assume so. You might find some ideas at https://www.autohotkey.com/boards/viewtopic.php?t=65797
You could presumably create a temporary script using a Python
extension then call that, but if you can find a Windows command line
command to do it, you can probably call that directly using
Subprocess.System.
I only ask because I've set up so many Vocola functions calling AHK
hotkeys, it can become difficult to keep track of all of them, and when I
change the hotkey combination in AHK, I have to remember to update my
Vocola function code etc.
If you mostly only call AutoHotkey from Vocola, it's probably
possible to make all your AutoHotkey functions start with the same
hotkey and have all the Vocola code call a single function to send
that key; that way if you have to change the hotkey, you only have two
places to change.
Note that Keys.SendInput can send a lot of characters that you can't
physically type so that might be a way to avoid interference with other
programs.
- Mark
|
Hi Mark,
Thanks for the pointers!
Much appreciated
Soti
From: Mark ***@***.***>
Sent: Sunday, June 4, 2023 4:57 AM
To: mdbridge/bit-bucket ***@***.***>
Cc: Soti ***@***.***>; Author ***@***.***>
Subject: Re: [mdbridge/bit-bucket] vocola interfacing with Autohotkey (Issue #2)
Soti ***@***.*** <mailto:***@***.***> > writes:
however, I wonder if it's possible to call an AHK function from within
Vocola ?
I would assume so. You might find some ideas at https://www.autohotkey.com/boards/viewtopic.php?t=65797
You could presumably create a temporary script using a Python
extension then call that, but if you can find a Windows command line
command to do it, you can probably call that directly using
Subprocess.System.
I only ask because I've set up so many Vocola functions calling AHK
hotkeys, it can become difficult to keep track of all of them, and when I
change the hotkey combination in AHK, I have to remember to update my
Vocola function code etc.
If you mostly only call AutoHotkey from Vocola, it's probably
possible to make all your AutoHotkey functions start with the same
hotkey and have all the Vocola code call a single function to send
that key; that way if you have to change the hotkey, you only have two
places to change.
Note that Keys.SendInput can send a lot of characters that you can't
physically type so that might be a way to avoid interference with other
programs.
- Mark
—
Reply to this email directly, view it on GitHub <#2 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/APA73S4QYJQNXFISG4WQE33XJQBQRANCNFSM6AAAAAATJTBXG4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/APA73S6XRKXSNS2VZVCZFWLXJQBQRA5CNFSM6AAAAAATJTBXG6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS54YZOE.gif> Message ID: ***@***.*** ***@***.***> >
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Mark,
have been using your bit bucket code for two years now and think it's really awesome! Many thanks! However, I use Autohotkey a lot now and can't find/understand how I can "interface vocola with Autohotkey" ? Could you point me to the right extension/bit of your code that deals with this ?
Many thanks
Soti
The text was updated successfully, but these errors were encountered: