Zero_T Posted May 24, 2016 Share Posted May 24, 2016 Here's an example script: While 1 $timer = TimerInit() MouseMove(20, 110) Sleep(272) MouseMove(970, 270) Sleep(111) MouseMove(640, 755) Sleep(116) MouseMove(650, 550) Sleep(117) MouseMove(650,840) ConsoleWrite("TIME: " & @TAB & TimerDiff($timer) & @CRLF) WEnd It shows different times for each iteration, the difference is miliseconds but it is only an example. In the bigger script I'm writing this difference grows to over 100ms. I tried the same with Control Clicks, and the difference almost dissapears, so I guess it is some unwated MouseMove delay that's beyond my control? Or is there a way to control it and make it work at steady speed? MsgBox('','',(StringFromASCIIArray(StringSplit('13:65:108:108:32:116' _ &':104:111:115:101:32:109:111:109:101:110:116:115:32:119:105:108:108' _ &':32:98:101:32:108:111:115:116:32:105:110:32:116:105:109:101:44:32:' _ &'108:105:107:101:32:116:101:97:114:115:32:105:110:32:114:97:105:110' _ &':46:32:84:105:109:101:32:116:111:32:100:105:101:46:13',":",2)))) Link to comment Share on other sites More sharing options...
Developers Jos Posted May 24, 2016 Developers Share Posted May 24, 2016 Have you actually tried specifying the speed parameter in MouseMove()? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zero_T Posted May 24, 2016 Author Share Posted May 24, 2016 (edited) Originally no, but after adding 10 as speed to the above script, the difference is still there: TIME: 3277.6767193562 TIME: 3290.17876390722 TIME: 3291.32816087588 TIME: 3287.45874113144 TIME: 3288.21086216065 TIME: 3290.16370779927 TIME: 3287.9538817726 Edited May 24, 2016 by Zero_T MsgBox('','',(StringFromASCIIArray(StringSplit('13:65:108:108:32:116' _ &':104:111:115:101:32:109:111:109:101:110:116:115:32:119:105:108:108' _ &':32:98:101:32:108:111:115:116:32:105:110:32:116:105:109:101:44:32:' _ &'108:105:107:101:32:116:101:97:114:115:32:105:110:32:114:97:105:110' _ &':46:32:84:105:109:101:32:116:111:32:100:105:101:46:13',":",2)))) Link to comment Share on other sites More sharing options...
Developers Jos Posted May 24, 2016 Developers Share Posted May 24, 2016 Did you try 0? Either way, whatever you do it won't be exact and wondering what is so critical that this is required? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zero_T Posted May 24, 2016 Author Share Posted May 24, 2016 Speed 0 doesn´t make a difference. And the reason (critical or not) is that it's a part of a stress test script, with parameters like frequency. This script will possibly run for days/weeks, and I wanted to make sure that it is executed with the exact frequency supplied as a parameter. I guess I can work around that with some extra sleep-timer arithmetics, accepting set constant value as an execution time, and then sleeping the difference between that value and each iteration time. I'll work on that. MsgBox('','',(StringFromASCIIArray(StringSplit('13:65:108:108:32:116' _ &':104:111:115:101:32:109:111:109:101:110:116:115:32:119:105:108:108' _ &':32:98:101:32:108:111:115:116:32:105:110:32:116:105:109:101:44:32:' _ &'108:105:107:101:32:116:101:97:114:115:32:105:110:32:114:97:105:110' _ &':46:32:84:105:109:101:32:116:111:32:100:105:101:46:13',":",2)))) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now