KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Switching between Split view in Microsoft word document
Topic Summary: 2 views of a Microsoft word document which I need to switch between
Created On: 09/09/2020 05:39 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Switching between Split view in Microsoft word document   - tnortham2919 - 09/09/2020 05:39 AM  
 Switching between Split view in Microsoft word document   - Scribe - 09/09/2020 10:12 AM  
 Switching between Split view in Microsoft word document   - Alan Cantor - 09/09/2020 10:28 AM  
 Switching between Split view in Microsoft word document   - kkkwj - 09/10/2020 08:39 PM  
 Switching between Split view in Microsoft word document   - Alan Cantor - 09/10/2020 11:31 PM  
 Switching between Split view in Microsoft word document   - kkkwj - 09/12/2020 07:12 PM  
 Switching between Split view in Microsoft word document   - Lunis Orcutt - 09/12/2020 10:29 PM  
 Switching between Split view in Microsoft word document   - Tiger Feet - 09/11/2020 06:06 AM  
 Switching between Split view in Microsoft word document   - Scribe - 09/11/2020 10:10 AM  
 Switching between Split view in Microsoft word document   - Alan Cantor - 09/11/2020 10:48 AM  
 Switching between Split view in Microsoft word document   - PG LTU - 09/11/2020 11:26 AM  
 Switching between Split view in Microsoft word document   - Edgar - 09/13/2020 09:29 AM  
 Switching between Split view in Microsoft word document   - wristofdoom - 09/13/2020 12:36 PM  
 Switching between Split view in Microsoft word document   - wristofdoom - 09/13/2020 12:36 PM  
 Switching between Split view in Microsoft word document   - tnortham2919 - 10/03/2020 03:34 PM  
Keyword
 09/12/2020 07:12 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 918
Joined: 11/05/2015

Hi Alan, thank you for the compliment on a creative way to use the MouseGrid command. Any time I can surprise an old hand like yourself, I must be doing something right!!

 

Yes, you are right about appending Click to the "mousegrid 6 4 2" command. That's exactly what I do, all in one breath and utterance. I forgot to add the click word when I made my original answer and post, but figured that people would catch on to the idea anyway. (And they did, and fixed my omission right away anyway. :-) Glad to help!

 

I should also add although the precise numbers don't matter that much (since you're not trying to hit a button), I did adjust my numbers to put the cursor in the part of the window that I was interested in. In my original case with Visual Studio, I wanted the insertion point to end up more or less on the left side of the buffer, about halfway down. So, that's where I clicked the mouse pointer.



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

Win10/11/x64, AMD Ryzen 7 3700X/3950X, 64/128GB RAM, Dragon 15.3, SP 7 Standard, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Amazon YUWAKAYI headset, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse



 09/12/2020 10:29 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39833
Joined: 10/01/2006

KnowBrainer VB II includes New Mouse which captures the X&Y coordinates of your cursor, creates a new KnowBrainer application specific command  (this cannot be accomplished in Dragon), names and saves your command in about 2 seconds. This is a single step command, slightly faster than using multiple MouseGrid strings but probably considerably easier to remember. However, if you would prefer to keep this in Dragon you can accomplish the same task by adding a few more quick steps and... if you wish to automate the process in Dragon via KnowBrainer VB II check out New Dragon Mouse command. We designed these commands for situations when you simply have no other choice, like hotkeys. The following command was created by Larry Allen, Polar Engineering and Valerie Matthews. We only added the verbal confirmation because there is otherwise no way to tell it worked, until you paste it.    

 

Option Explicit

Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Type POINTAPI
x As Long
y As Long
End Type

' declare Win32 API functions

Declare Function GetCursorPos Lib "user32" _
  Alias "GetCursorPos" (lpPoint As POINTAPI) As Long

Declare Function GetWindowRect Lib "user32" _
  Alias "GetWindowRect" (ByVal hwnd As Long, _
  lpRect As RECT) As Long

Declare Function GetForegroundWindow& Lib "user32" ()

Function GetWinCurPos(hwnd As Long) As POINTAPI

Dim pt As POINTAPI
Dim wRect As RECT
Dim result As POINTAPI

GetCursorPos pt

GetWindowRect hwnd, wRect

result.x = pt.x - wRect.Left
result.y = pt.y - wRect.Top

GetWinCurPos = result
End Function
Sub Main
Dim hwnd As Long
Dim result As POINTAPI
Dim clip As String

hwnd = GetForegroundWindow
result = GetWinCurPos(hwnd)

clip = "SetMousePosition 1," & result.x & _
"," & result.y
clip = clip & Chr(13) & Chr(10) & _
"Wait 0.5" & Chr(13) & Chr(10) & _
"ButtonClick 1,1" & Chr(13) & Chr(10) & _
"Wait 0.5" & Chr(13) & Chr(10)
'
Clipboard clip
'
TTSPlayString "ready"
End Sub


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

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1



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

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