Jump to content

Recommended Posts

Posted

Hi,

I have trouble clicking the mouse due to wrist problems. I use auto it script that I wrote to emulate mouse keys through the keypad. This worked perfectly in Windows 7. When I migrated to Windows 10 it still works well but on certain windows it does not work at all. The code is really simple and pasted below.

For example when using Google Chrome/Auto it... All the hotkey's work as intended. However on certain windows, for example disk management, DragonDictate, regedit, msconfig, software like AOEMI partition manager, none of the hotkey's work. Instead of doing left click it will type the number 5 when numpad 5 is pressed. If I manually click away from that window to another window for example chrome the hotkey start working again. 

 

This problem did not exist in Windows 7. I can use the same exact script on Windows 7 computer without a problem. It is not a hot key assignment issue since it works well in most of the settings.If certain windows are in the foreground all auto it functions stop functioning. Could this be a permissions thing? Any help as to why this is happening will be appreciated. Thanks.

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=Basic ME.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


opt('mousecoordmode', 0)
opt('pixelcoordmode', 0)
Opt("TrayAutoPause", 0)


hotkeyset('{numpad7}', 'mclick')
hotkeyset('{numpad8}', 'dclick')
hotkeyset('{numpad9}', 'rclick')

hotkeyset('{numpad4}', 'shiftclick')
hotkeyset('{numpad5}', 'lclick')
hotkeyset('{numpad6}', 'ctrlclick')


;hotkeyset('{F4}', 'shiftclick')
hotkeyset('{F1}', 'lclick')
;hotkeyset('{F3}', 'ctrlclick')
hotkeyset('{numpad1}', 'scrollup')
hotkeyset('{numpad3}', 'scrolldown')
hotkeyset('{numpad0}', 'ldown')
hotkeyset('{numpaddot}', 'ldown')
hotkeyset('{f7}', 'quit')

global $ldown = False
;~ Global $gwx = 0, $gwy = 0


while 1
sleep(100)
tooltip("ME F7" ,2500, 0)
wend

func lclick()
if $ldown then
      $ldown = false
      mouseup("left")
   else
      mouseclick("left")
   endif
endfunc

func dclick()
checkldown()
mouseclick("left")
mouseclick("left")
endfunc

func shiftclick()
checkldown()
send("{shiftdown}")
mouseclick("left")
send("{shiftup}")
endfunc

func ctrlclick()
checkldown()
send("{ctrldown}")
mouseclick("left")
send("{ctrlup}")
endfunc

func rclick()
checkldown()
mouseclick("right")
endfunc

func mclick()
checkldown()
mouseclick("middle")
endfunc

func checkldown()
   if $ldown then
      ldown()
   endif
endfunc

func ldown()
   if $ldown then
      $ldown = false
      mouseup("left")
   else
      $ldown = true
      mousedown("left")
   endif
endfunc

Func scrollup()
    mousewheel("Up",20)
EndFunc

Func scrolldown()
    mousewheel("down",20)
EndFunc


func quit()
   exit
endfunc   ;==>quit

 

Posted (edited)

I concentrated on numpad 5.  I first tested on win7 with regedit and the behavior that you described was happening ( Yes with Win7 ! ).  I was unable to left click with numpad 5 inside RegEdit.  But if you add #RequireAdmin then the issue was gone...Try it to see if it solves your problem.

Edited by Nine
Posted
3 hours ago, Nine said:

I concentrated on numpad 5.  I first tested on win7 with regedit and the behavior that you described was happening ( Yes with Win7 ! ).  I was unable to left click with numpad 5 inside RegEdit.  But if you add #RequireAdmin then the issue was gone...Try it to see if it solves your problem.

Thanks. That did the trick. I was using a shortcut that gave said run as admin but that was not working for some reason. I went directly to the executable and had that run as administration. That did the trick. It is working everywhere now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...