KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Command to toggle on/off high contrast
Topic Summary:
Created On: 11/02/2021 04:30 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Command to toggle on/off high contrast   - BillMiller823 - 11/02/2021 04:30 AM  
 Command to toggle on/off high contrast   - Lunis Orcutt - 11/02/2021 11:41 AM  
 Command to toggle on/off high contrast   - Tiger Feet - 11/02/2021 04:12 PM  
 Command to toggle on/off high contrast   - Edgar - 11/03/2021 11:20 AM  
 Command to toggle on/off high contrast   - BillMiller823 - 11/03/2021 10:43 PM  
 Command to toggle on/off high contrast   - Edgar - 11/04/2021 11:11 AM  
 Command to toggle on/off high contrast   - BillMiller823 - 11/03/2021 11:20 PM  
 Command to toggle on/off high contrast   - BillMiller823 - 11/05/2021 06:07 AM  
 Command to toggle on/off high contrast   - Edgar - 11/05/2021 11:57 AM  
 Command to toggle on/off high contrast   - Edgar - 11/05/2021 12:35 PM  
 Command to toggle on/off high contrast   - R. Wilke - 11/05/2021 04:53 PM  
 Command to toggle on/off high contrast   - BillMiller823 - 11/06/2021 03:56 AM  
 Command to toggle on/off high contrast   - Edgar - 11/06/2021 11:32 AM  
Keyword
 11/02/2021 04:30 AM
User is offline View Users Profile Print this message

Author Icon
BillMiller823
Top-Tier Member

Posts: 281
Joined: 08/21/2010

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



-------------------------


Bill Miller :-)
C1-2 Quadriplegic with a 255 High Bowling Game
Co-founder of Manufacturing Genuine Thrills Inc.
Business website: http://www.ikanbowler.com
Personal website: http://www.lookmomnohands.net

 11/02/2021 11:41 AM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39967
Joined: 10/01/2006

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
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1



 11/02/2021 04:12 PM
User is offline View Users Profile Print this message

Author Icon
Tiger Feet
Top-Tier Member

Posts: 2207
Joined: 12/04/2009

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

| DPG 15.7.1 | KnowBrainer 2020 | Windows 10 Professional /64 Bit | Intel® Core™ i9 Ten-Core Processor i9-10900K (3.7GHz) 20MB Cache |  32GB RAM. | 250GB SAMSUNG 970 EVO PLUS M.2, PCIe NVMe SSD (up to 3500MB/R, 2300MB/W) Boot Drive | 1TB SAMSUNG 970 EVO PLUS M.2, PCIe NVMe SSD (up to 3500MB/R, 3300MB/W) Storage Drive | Sennheiser D10 USB Wireless Microphone

 11/03/2021 11:20 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

 

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
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 11/03/2021 10:43 PM
User is offline View Users Profile Print this message

Author Icon
BillMiller823
Top-Tier Member

Posts: 281
Joined: 08/21/2010

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.

-------------------------


Bill Miller :-)
C1-2 Quadriplegic with a 255 High Bowling Game
Co-founder of Manufacturing Genuine Thrills Inc.
Business website: http://www.ikanbowler.com
Personal website: http://www.lookmomnohands.net

 11/04/2021 11:11 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

Originally posted by: BillMiller823 Edgar, wow, that language is over my head, but I copied everything you wrote and pasted it into a global KnowBrainer command.

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
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 11/03/2021 11:20 PM
User is offline View Users Profile Print this message

Author Icon
BillMiller823
Top-Tier Member

Posts: 281
Joined: 08/21/2010

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."



-------------------------


Bill Miller :-)
C1-2 Quadriplegic with a 255 High Bowling Game
Co-founder of Manufacturing Genuine Thrills Inc.
Business website: http://www.ikanbowler.com
Personal website: http://www.lookmomnohands.net

 11/05/2021 06:07 AM
User is offline View Users Profile Print this message

Author Icon
BillMiller823
Top-Tier Member

Posts: 281
Joined: 08/21/2010

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.



-------------------------


Bill Miller :-)
C1-2 Quadriplegic with a 255 High Bowling Game
Co-founder of Manufacturing Genuine Thrills Inc.
Business website: http://www.ikanbowler.com
Personal website: http://www.lookmomnohands.net

 11/05/2021 11:57 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

Originally posted by: BillMiller823 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
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 11/05/2021 12:35 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

Turned out to be pretty easy after doing a lot of research:

Sub Main

   ShellExecute "sethc 251"

   Wait 2

   SendKeys "%y", 1

End Sub

The "Wait 2" is much too long on my system; try these values on your system:

   Wait 1

   Wait .5

   Wait .1

(the last version:   Wait .1   works great on my system).



-------------------------

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 11/05/2021 04:53 PM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7881
Joined: 03/04/2007

Good job, Edgar.

-------------------------



No need to buy if all you want to do is try ...

DragonCapture KB Download (Latest)
DragonCapture Homepage

 11/06/2021 03:56 AM
User is offline View Users Profile Print this message

Author Icon
BillMiller823
Top-Tier Member

Posts: 281
Joined: 08/21/2010

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



-------------------------


Bill Miller :-)
C1-2 Quadriplegic with a 255 High Bowling Game
Co-founder of Manufacturing Genuine Thrills Inc.
Business website: http://www.ikanbowler.com
Personal website: http://www.lookmomnohands.net



 11/06/2021 11:32 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

@Rüdiger - thanks for the kind words!

@Bill - my pleasure; in testing the process, I found that toggling the high contrast mode might well be something I will do myself.



-------------------------

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

Statistics
32324 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 350 guests browsing this forum, which makes a total of 350 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.