KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Anyone know of a script to mouseclick via screen coordinates?
Topic Summary:
Created On: 09/13/2021 10:09 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Anyone know of a script to mouseclick via screen coordinates?   - Grandslam - 09/13/2021 10:09 PM  
 Anyone know of a script to mouseclick via screen coordinates?   - kkkwj - 09/14/2021 01:41 AM  
 Anyone know of a script to mouseclick via screen coordinates?   - Matt_Chambers - 09/14/2021 09:33 AM  
 Anyone know of a script to mouseclick via screen coordinates?   - dilligence - 09/14/2021 05:49 PM  
 Anyone know of a script to mouseclick via screen coordinates?   - Mphillipson - 09/17/2021 03:53 PM  
 Anyone know of a script to mouseclick via screen coordinates?   - Grandslam - 09/20/2021 02:47 AM  
 Anyone know of a script to mouseclick via screen coordinates?   - Mphillipson - 09/23/2021 12:17 PM  
 Anyone know of a script to mouseclick via screen coordinates?   - kkkwj - 09/20/2021 01:48 PM  
 Anyone know of a script to mouseclick via screen coordinates?   - Mphillipson - 09/23/2021 12:21 PM  
Keyword
 09/13/2021 10:09 PM
User is offline View Users Profile Print this message

Author Icon
Grandslam
Senior Member

Posts: 139
Joined: 05/10/2019

Hi all,

At work I utilise software that incorporates tabs and buttons which are inconsistently placed on the screen depending on your work task at the time. By that I mean, the "Approved" button could be located near the top left on one screen, but on another screen it could be near the top right, or even somewhere completely different.

I know that there are lots of MouseGrid commands, however I find these quite cumbersome to use in a fast paced work environment. What I would prefer to do, if possible, is to say something like "Coordinate B3" or "Coordinate G9" and have the mouse go to that location, somewhat like playing a game of battleships. I would probably need to place stickers on the edge of my monitor to assist with selecting the correct coordinate.

Just wondering if anyone knows of a script which would achieve this.

Craig

 

 09/14/2021 01:41 AM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 831
Joined: 11/05/2015

Sub Main

Dim xscale As Single, yscale As Single

' 1.25 = 125% scaling on my monitor; use 100% by default

' this clicks 1638px from left side, 1070px from the top

xscale = 1638*1.25

yscale = 1070*1.25

SetMousePosition 0,Int(xscale),Int(yscale)

Wait 0.1

ButtonClick 1,1    'left click, one time

End Sub



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

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

 09/14/2021 09:33 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 455
Joined: 08/09/2018

If you are willing to install Python and Natlink, the Caster add-on has several MouseGrid replacements. I have experimented with them briefly, but, since I have full hand use of the mouse, have not actually used them seriously. Here is a listing of the replacements:

https://caster-lexiconcode.readthedocs.io/en/latest/readthedocs/Caster_Commands/Mouse/



 09/14/2021 05:49 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1432
Joined: 08/16/2010

SP 6 PRO has a very fast and adjustable Grid that works right out of the box:

http://www.speechproductivity.eu/SP6PRO.html#image2-f7

 

If you want something simpler, SP 6 Standard features the Button Grid:

http://www.speechproductivity.eu/SPStandard.html#image2-f8



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


Auto Box© Demo now available



 09/17/2021 03:53 PM
User is offline View Users Profile Print this message

Author Icon
Mphillipson
Top-Tier Member

Posts: 280
Joined: 09/22/2014

I try to avoid having numbers everywhere and in some cases they don't work. Instead I have labels stuck on the edge of my monitors and a script command to position the mouse and click where necessary.

Please see the following link for more info:


https://github.com/Mark-Phillipson/DragonScripts/wiki/Clicking-Anywhere-on-the-Screen-by-Voice



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

Thanks Mark


 


Dragon Professional Advanced Scripting/KnowBrainer Scripts
Video Examples of Coding by Voice



 09/20/2021 02:47 AM
User is offline View Users Profile Print this message

Author Icon
Grandslam
Senior Member

Posts: 139
Joined: 05/10/2019

Thanks Mark, that is exactly what I was looking for. Does that script have to be run in Knowbrainer or can it be run as an Advanced Scripting command?

 09/23/2021 12:17 PM
User is offline View Users Profile Print this message

Author Icon
Mphillipson
Top-Tier Member

Posts: 280
Joined: 09/22/2014

It should work with Advanced Scripting because that's how I originally wrote it

However because I converted it to KnowBrainer, there may be something that don't work...



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

Thanks Mark


 


Dragon Professional Advanced Scripting/KnowBrainer Scripts
Video Examples of Coding by Voice

 09/20/2021 01:48 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 831
Joined: 11/05/2015

Hi Mark, That's a great idea, giving a name to a horizontal line. Your documentation said, "This enables you to click anywhere on a horizontal line which has been given a name. Taskbar Bravo 9, Ribbon Zulu 4, etc." The keyword taskbar would give you the vertical component, but I don't understand how "Bravo 9" works. The Bravo would be the horizontal cell (A-Z1-7). What does the number after the second word do? Is it some kind of fine-grain positioning inside of the 50 x 50 cell? Thank you.

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

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

 09/23/2021 12:21 PM
User is offline View Users Profile Print this message

Author Icon
Mphillipson
Top-Tier Member

Posts: 280
Joined: 09/22/2014

Hello Kevin

 

Because the Taskbar can be quite crowded, extra precision is required greater than 50 pixels.

So the 9 means after coordinate Bravo also move 90% of the 50 pixels to the right.



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

Thanks Mark


 


Dragon Professional Advanced Scripting/KnowBrainer Scripts
Video Examples of Coding by Voice



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

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