I'm willing to pay $40 U.S. by paypal to someone who can write a script for me. I can't justify spending dozens of hours figuring out how to solve my problem:
I have a multi-monitor system with one device having a touch-screen input. Windows moves the mouse cursor whenever you touch the screen. If you are using an application on the non-touch monitor, this is an unwanted behavior. I can't figure out any way to natively prevent windows from moving the mouse on a touch event (bounty available for a native solution as well, btw). I need to retain full touch functionality on the touch device while preventing the mouse cursor from moving when I use the device.
The ideal solution would prevent the behavior altogether. Alternatively, AHK could be used to check the mouse position on a touch event and return it to the previous spot after Windows moves it. This website may be relevant to detecting touch events (superuser.com/questions/565025/stopping-the-mouse-cursor-from-moving-when-using-a-touchscreen-and-multiple-moni).
I will pay one bounty based on my satisfaction of the following requirements:
[*]Prevents and/or repositions mouse cursor on touch event so that cursor remains at whatever monitor/position it was at when the touch event was detected
[*]Retains full native touchscreen functionality otherwise
[*]Reasonably efficient
[*]System: Microsoft Surface Pro 1 running Windows 8.1 64-bit
Thanks,
Justin
$40 bounty Need script to stop mouse cursor moving on touch
Re: $40 bounty Need script to stop mouse cursor moving on to
How about this? Use control-Escape to exit, but that can be omitted or changed.
Edit: Made a change to account for the possibility that the mouse is already in the touch monitor's area so it doesn't get stuck in there to start.
Code: Select all
#SingleInstance, Force
CoordMode, Mouse, Screen
SysGet, MonCount, MonitorCount
Loop, %MonCount%
{
SysGet, Mon, Monitor, %A_Index%
Width := MonRight - MonLeft
Height := MonBottom - MonTop
if (Width = 1920) && (Height = 1080)
break
}
MouseGetPos, LX, LY
Loop
{
MouseGetPos, MX, MY
if ((MX >= MonLeft) && (MX <= MonRight) && (MY >= MonTop) && (MY <= MonBottom))
&& not ((LX >= MonLeft) && (LX <= MonRight) && (LY >= MonTop) && (LY <= MonBottom))
MouseMove, LX, LY, 0
else
{
LX := MX
LY := MY
}
Sleep, 50
}
^Esc::ExitApp
Last edited by boiler on 03 Feb 2015, 21:36, edited 1 time in total.
Re: $40 bounty Need script to stop mouse cursor moving on to
This assumes that your Surface Pro 1 is running at the native resolution (don't know if it can even be changed anyway) and it's the only monitor on your system running at that exact resolution (1920 x 1080). If not, let me know, and we can work around that.
Re: $40 bounty Need script to stop mouse cursor moving on to
Wow a faster response than expected. I will test by this weekend and get back to you.boiler wrote:This assumes that your Surface Pro 1 is running at the native resolution (don't know if it can even be changed anyway) and it's the only monitor on your system running at that exact resolution (1920 x 1080). If not, let me know, and we can work around that.
Re: $40 bounty Need script to stop mouse cursor moving on to
If I got two monitors, how can I put a text in the monitor1 and another different text in the monitor2?
Thanks in advance.
Thanks in advance.
Everything is possible!
Re: $40 bounty Need script to stop mouse cursor moving on to
empardopo wrote:If I got two monitors, how can I put a text in the monitor1 and another different text in the monitor2?
Code: Select all
SysGet, Mon1, Monitor, 1
SysGet, Mon2, Monitor, 2
Gui1X := Mon1Left + (Mon1Right - Mon1Left) / 2 - 100
Gui1Y := (Mon1Bottom - Mon1Top) / 2 - 25
Gui2X := Mon2Left + (Mon2Right - Mon2Left) / 2 - 100
Gui2Y := (Mon2Bottom - Mon2Top) / 2 - 25
Gui, 1:New
Gui, 1:Add, Text,,Here's some text on monitor 1.
Gui, 1:Show, w200 h50 x%Gui1X% y%Gui1Y%
Gui, 2:New
Gui, 2:Add, Text,,Here's some different text on monitor 2.
Gui, 2:Show, w200 h50 x%Gui2X% y%Gui2Y%
return
GuiClose:
2GuiClose:
ExitApp
Last edited by boiler on 04 Feb 2015, 06:37, edited 3 times in total.
Re: $40 bounty Need script to stop mouse cursor moving on to
Will eithermouse not do this?
Re: $40 bounty Need script to stop mouse cursor moving on to
Thanks! It looks very easy...
I don't understand the values 2 - 100, 2 - 25 and 2 - 26. They mean?
I don't understand the values 2 - 100, 2 - 25 and 2 - 26. They mean?
Everything is possible!
Re: $40 bounty Need script to stop mouse cursor moving on to
If the existing attempts do not work, let me know, I think I could do this using low level windows hooks to stop the event from ever happening, but I won't bother if someone else has already collected the bounty.
Re: $40 bounty Need script to stop mouse cursor moving on to
The 26 was a typo. I changed it to 25.empardopo wrote:Thanks! It looks very easy...
I don't understand the values 2 - 100, 2 - 25 and 2 - 26. They mean?
They are just doing math to find the middle of each screen in the x and y directions. Take half of the width and add it to the leftmost x coordinate for that window and subtract 100 (100 is half of the width of the GUI). Similar for the y direction.
Re: $40 bounty Need script to stop mouse cursor moving on to
It looks like no one is collecting the bounty.evilC wrote:If the existing attempts do not work, let me know, I think I could do this using low level windows hooks to stop the event from ever happening, but I won't bother if someone else has already collected the bounty.
Re: $40 bounty Need script to stop mouse cursor moving on touch
you rock boiler!
Who is online
Users browsing this forum: No registered users and 352 guests