![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Command to toggle on/off high contrast Topic Summary: Created On: 11/02/2021 04:30 AM Status: Post and Reply |
|
![]() |
![]() |
- BillMiller823 | - 11/02/2021 04:30 AM |
![]() |
![]() |
- Lunis Orcutt | - 11/02/2021 11:41 AM |
![]() |
![]() |
- Tiger Feet | - 11/02/2021 04:12 PM |
![]() |
![]() |
- Edgar | - 11/03/2021 11:20 AM |
![]() |
![]() |
- BillMiller823 | - 11/03/2021 10:43 PM |
![]() |
![]() |
- Edgar | - 11/04/2021 11:11 AM |
![]() |
![]() |
- BillMiller823 | - 11/03/2021 11:20 PM |
![]() |
![]() |
- BillMiller823 | - 11/05/2021 06:07 AM |
![]() |
![]() |
- Edgar | - 11/05/2021 11:57 AM |
![]() |
![]() |
- Edgar | - 11/05/2021 12:35 PM |
![]() |
![]() |
- R. Wilke | - 11/05/2021 04:53 PM |
![]() |
![]() |
- BillMiller823 | - 11/06/2021 03:56 AM |
![]() |
![]() |
- Edgar | - 11/06/2021 11:32 AM |
![]() |
|
Hi guys,
I would like to toggle on/off high contrast display settings with a single voice command.
It says the keystrokes are:
press left alt + left shift + print screen
Is that doable with KnowBrainer?
Something like this:
SendKeys "%+{prsc}"
I think that is "alt + shift + print screen" but I don't know how to distinguish left alt and left shift.
Thanks for your time.
Bill -------------------------
|
|
|
|
![]() |
|
Please try the following and report back. If it doesn't work, we can convert it to a DVC script which will also work in Dragon or KnowBrainer. Try the following Advanced-Scripting script:
Sub Main SendKeys "%{Left}" Wait 0.1 SendKeys "+{Left}{Prtsc}" End Sub
------------------------- Change "No" to "Know" w/KnowBrainer 2020 |
|
|
|
![]() |
|
Bill,
If all you want to do is take a picture of the set screen on your computer, say, "press print screen" (to capture the entire screen) or "press Alt print screen" (to capture the focused window.) No need to make a command as it is already there. Obviously, if you only want to use one word to trigger this command, then Lunis' script is the way to go. Cheers ------------------------- Tiger Feet |
|
|
|
![]() |
|
Const VK_LMENU = &hA4 Const VK_LALT = &hA4' alias Const VK_LSHIFT = &hA0 Const VK_SNAPSHOT = &h2C Const VK_PRINT_SCREEN = &h2C' alias
' Declare keyboard events Windows API function Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _ Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long ' declare virtual key constant for the left Windows key, ' control key, shift key and alt key
Sub Main ' press and hold the keys: keybd_event(VK_LMENU,0,0,0) keybd_event(VK_LSHIFT,0,0,0) keybd_event(VK_SNAPSHOT,0,0,0) ' Release the keys in the reverse order: keybd_event(VK_SNAPSHOT,0,2,0) keybd_event(VK_LSHIFT,0,2,0) keybd_event(VK_LMENU,0,2,0) End Sub ------------------------- -Edgar |
|
|
|
![]() |
|
Thank you guys for your responses.
Lunis, I put your script into a global KnowBrainer command. But when I tried to deploy it, nothing seemed to happen. Tiger Feet, your info is good, but I think you misread what I'm trying to do. (No worries!) Edgar, wow, that language is over my head, but I copied everything you wrote and pasted it into a global KnowBrainer command. Nothing seemed to happen when I tried to deploy it. I figured all of that goes in the script box, not just the part beginning with Sub Main... right? I am using Windows 10 Home with DPI 15.6 and KnowBrainer Professional 2017. Thank you gentlemen. -------------------------
|
|
|
|
![]() |
|
Sorry, I could not get it to work with either KnowBrainer nor Dragon. Physically pressing the keys on the keyboard only works using the left alternate and left shift keys. I could try writing a C# application if you want to try that… ------------------------- -Edgar |
|
|
|
![]() |
|
If you want to know why I would like the keyboard shortcut as a voice command, here is my process for toggling it on/off now:
"Show desktop" "mouse 5 right click" "click personalize" that gets me into the proper area of my control panel (the "background" area). Next, I click on "high contrast settings" underneath "related settings" on the right side, which I do by using SpeechStart+'s Show Numbers/Flags. "Show flags" "7" that gets me to the high contrast settings screen. "Show flags" "9" That toggles the high contrast settings. But underneath the toggle button, it says "Press left Alt + left Shift + Print Screen to turn high contrast on and off." -------------------------
|
|
|
|
![]() |
|
I appreciate the offer, Edgar, but please only do it if it is a challenge you would enjoy, or something not too time-consuming. The other caveat is that I would need to deploy it by voice, using either KnowBrainer or DPI.
Knowing that, if you want to help... I would appreciate being able to change display settings more easily than the seven voice commands listed above. Thanks for even considering it. -------------------------
|
|
|
|
![]() |
|
it would be both fun and quite simple for me to write a C# application, but, I may have thought of an even simpler method… The dialog which opens after pressing the key combination shows up in the task manager as: C:\Windows\System32\EaseOfAccessDialog.EXE calling it directly does not open the dialog so I am suspecting that it needs some kind of a switch or parameter. If so, and if I can figure out the switch or parameter then we could deploy it with an app bring up command. Let me do some research… ------------------------- -Edgar |
|
|
|
![]() |
|
Turned out to be pretty easy after doing a lot of research: Sub Main ShellExecute "sethc 251" Wait 2 SendKeys "%y", 1 End Sub Wait 1 Wait .5 Wait .1 (the last version: Wait .1 works great on my system). ------------------------- -Edgar |
|
|
|
![]() |
|
Good job, Edgar.
-------------------------
|
|
|
|
![]() |
|
Edgar… that works BEAUTIFULLY – THANKS!
Just FYI, I am using "Wait 0.2" (I read your system specs; it is about twice as good as mine, so I doubled it!)
Now that is easy to switch back and forth, I will do so more often – much appreciated!
Bill -------------------------
|
|
|
|
![]() |
|
@Rüdiger - thanks for the kind words! ------------------------- -Edgar |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.