Jump to content

mouseclick time-consuming problem [ win10]


Recommended Posts

How to solve the time-consuming problem of mouseclick on Win10 , which is more serious when I open the taskmanager process

test:

Opt("MouseClickDelay",0)
Opt("MouseClickDownDelay",0)

Local $hTimer,$s
mousemove(0,0,3)

for $i=1 to 10

$hTimer = TimerInit()
;MouseClick("left")
;MouseDown("left")
MouseUp("left")
_Wait(555)
$s&=TimerDiff($hTimer)&@CR
next

exit msgbox(0,0,$s)

Func _Wait($iTime)
Local $hTimer=TimerInit()
While TimerDiff($hTimer)<$iTime
Wend
EndFunc

 

it works well on Win7

From Google Translator,Please forgive my poor English.
 
Edited by lin6051
Link to post
Share on other sites
On 3/18/2019 at 11:20 AM, jdelaney said:

MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] )

set speed to 0.

I've tried it,  

 

Opt("MouseClickDelay",0)
Opt("MouseClickDownDelay",0)

Local $hTimer,$s
mousemove(0,0,3)

for $i=1 to 10

$hTimer = TimerInit()
MouseClick('left',Default,Default,1,0)
_Wait(555)
$s&=TimerDiff($hTimer)&@CR
next

exit msgbox(0,'Results',$s)

Func _Wait($iTime)
Local $hTimer=TimerInit()
While TimerDiff($hTimer)<$iTime
Wend
 EndFunc 

10 Results:  

Min 555  Max570+     By  Win10 ver 10.0.17763.55

Min 555  Max 556   By Win10 ver10.0.14393      <---It works well here.

Edited by lin6051
Link to post
Share on other sites

Probably want to use python or c code if you want extreme performance.  also, that time variance can be causes by any one of the functions you are calling, including your loops

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to post
Share on other sites
10 hours ago, jdelaney said:

Probably want to use python or c code if you want extreme performance.  also, that time variance can be causes by any one of the functions you are calling, including your loops

No, I tested the same computer.

keybd_event   no problem        MouseClick  --->  Send  or  _WinAPI_Keybd_Event

"Windows 10 Enterprise 2016 LTSB "  is ok,  Win7  is ok

"Windows 10 Enterprise LTSC " and  "Win10 Pro"  have this problem

mouse_event   have this problem

 

Opt("SendKeyDelay",0)
Opt("SendKeyDownDelay",0)

Local $hTimer,$s

for $i=1 to 10
$hTimer = TimerInit()
Send('{UP}')
_Wait(555)
$s&=TimerDiff($hTimer)&@CR
next

exit msgbox(0,0,$s)

Func _Wait($iTime)
Local $hTimer=TimerInit()
While TimerDiff($hTimer)<$iTime
Wend
EndFunc

 

Edited by lin6051
Link to post
Share on other sites
5 hours ago, lin6051 said:

"Windows 10 Enterprise 2016 LTSB "  is ok,  Win7  is ok

"Windows 10 Enterprise LTSC " and  "Win10 Pro"  have this problem

Sounds like an OS problem.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites

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.

  • Similar Content

    • By JNutt
      I'm trying to use mouseclick in a panel above.  I want to click on a list item, such as 'Estimated'.  (I've given up on trying to use control click for this).  I'm using window info coordinates from 'Control' tab.

      ; click 'Columns' WinActivate("Innovaya Studio with Sage (Archtectural 2017_V1.invx") MouseClick("primary", 292, 88, 1, 1) WinActivate("Select Browsing Properties") Sleep(1000) MouseClick("primary", 27, 70, 0,0) Sleep(2000) Send("{TAB}{TAB}{TAB}{TAB}{TAB}") Sleep(1000) Send("{ENTER}") ControlClick( But when I used the code Autoit doesn't click where the coordinates are.  In the scipts it is the second MouseClick that won't work.  Any ideas?
×
×
  • Create New...