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 10:29 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

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



Statistics
32529 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 371 guests browsing this forum, which makes a total of 372 users using this forum.

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