uhhuy055 Posted August 27, 2022 Share Posted August 27, 2022 If that's not possible what's a fast way to set every MouseMove to 5 speed? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 27, 2022 Developers Share Posted August 27, 2022 (edited) Try F1 in the editor to open the helpfile and learn how to change the delays. ps: au3record isn't supported anymore for quite a while and really considered as a tool not to use, but rather we encourage to make some smarter code. Edited August 27, 2022 by 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...
uhhuy055 Posted August 27, 2022 Author Share Posted August 27, 2022 Can't find how to change default speed which is 10. I don't wanna manually change 100 lines of MouseMove to 5 speed. I'm not a coder, I just want an easy to use mouse recorder. This is the first one I tried and is easy to use Link to comment Share on other sites More sharing options...
Jfish Posted August 31, 2022 Share Posted August 31, 2022 So since you are struggling with what Jos suggested, I wrote this script for you that you can use to process your script that was created with Au3Rercord. It allows you to specify the speed and it will alter the file you create to whatever speed you want. ; mousemove script scrubber #include<Array.au3> $speed=6 ; set this to whatever speed you want global $file= FileOpen(@desktopdir&"/au3record.au3"); open file (this is the location where you save you au3Record file) if @error then ; check for errors MsgBox(0,'error',@error) EndIf func _changeSpeed($file) $contents= fileread($file); gather contents of file FileClose($file); close file $stringArray=StringSplit($contents,@cr) ; this pulls the contents into an array for $a=0 to UBound($stringArray)-1 ; this iterates through the array, looks for mouse move, and sets the speed ;ConsoleWrite($a) if _ArraySearch($stringArray,"MouseMove",$a,$a,0,1)<>-1 then ;MsgBox(0,'','hit') $stringArray[$a]=StringTrimRight($stringArray[$a],1)&","&$speed&")" EndIf Next _ArrayDelete($stringArray,0); deletes initial value of array that is from the string split _ArrayDisplay($stringArray) ; optionally shows you the results of the new array $newString=_ArrayToString($stringArray) ; optionally creates a new string you can save as a new AU3 file to replace the one above MsgBox(0,'',$newString); optionally shows that new script you can save to a file in a message box EndFunc _changeSpeed($file) ; runs the function Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
uhhuy055 Posted September 6, 2022 Author Share Posted September 6, 2022 (edited) The script does change mousemove speeds but adds | to the end of every line which gives Error: unable to parse line Edited September 6, 2022 by uhhuy055 Link to comment Share on other sites More sharing options...
Jfish Posted September 6, 2022 Share Posted September 6, 2022 (edited) That was a default delimiter in the _arraytostring function. Passing blanks for those parameters resolves it: ; mousemove script scrubber #include<Array.au3> $speed=6 ; set this to whatever speed you want global $file= FileOpen(@desktopdir&"/au3record.au3"); open file (this is the location where you save you au3Record file) if @error then ; check for errors MsgBox(0,'error',@error) EndIf func _changeSpeed($file) $contents= fileread($file); gather contents of file FileClose($file); close file $stringArray=StringSplit($contents,@cr) ; this pulls the contents into an array for $a=0 to UBound($stringArray)-1 ; this iterates through the array, looks for mouse move, and sets the speed ;ConsoleWrite($a) if _ArraySearch($stringArray,"MouseMove",$a,$a,0,1)<>-1 then ;MsgBox(0,'','hit') $stringArray[$a]=StringTrimRight($stringArray[$a],1)&","&$speed&")" EndIf Next _ArrayDelete($stringArray,0); deletes initial value of array that is from the string split _ArrayDisplay($stringArray) ; optionally shows you the results of the new array $newString=_ArrayToString($stringArray,"","") ; remove pipes + optionally creates a new string you can save as a new AU3 file to replace the one above MsgBox(0,'',$newString); optionally shows that new script you can save to a file in a message box EndFunc _changeSpeed($file) ; runs the function Edited September 6, 2022 by Jfish Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
uhhuy055 Posted September 7, 2022 Author Share Posted September 7, 2022 yay. Thanks But now it adds this at the beginning --------------------------- --------------------------- and this at the end --------------------------- OK --------------------------- which gives the same error but I can just delete those Link to comment Share on other sites More sharing options...
Solution Jfish Posted September 7, 2022 Solution Share Posted September 7, 2022 (edited) I am not sure what you are doing after you create the new string (i.e. after my function ended) but I am not seeing those lines when I save it down to a file. I am including some code to demonstrate. Note the new bit at the end of the function that now saves it as a new file. You can put it wherever and rename it if you like. However, when you compare the original from Au3Record with the new one the only difference should be the delays that were added. ; mousemove script scrubber #include<Array.au3> $speed=6 ; set this to whatever speed you want global $file= FileOpen(@desktopdir&"/au3test.au3"); open file (this is the location where you save you au3Record file) if @error then ; check for errors MsgBox(0,'error',@error) EndIf func _changeSpeed($file) $contents= fileread($file); gather contents of file FileClose($file); close file $stringArray=StringSplit($contents,@cr) ; this pulls the contents into an array for $a=0 to UBound($stringArray)-1 ; this iterates through the array, looks for mouse move, and sets the speed ;ConsoleWrite($a) if _ArraySearch($stringArray,"MouseMove",$a,$a,0,1)<>-1 then ;MsgBox(0,'','hit') $stringArray[$a]=StringTrimRight($stringArray[$a],1)&","&$speed&")" EndIf Next _ArrayDelete($stringArray,0); deletes initial value of array that is from the string split _ArrayDisplay($stringArray) ; optionally shows you the results of the new array $newString=_ArrayToString($stringArray,"","") ; remove pipes + optionally creates a new string you can save as a new AU3 file to replace the one above MsgBox(0,'',$newString); optionally shows that new script you can save to a file in a message box $newFile=FileOpen(@DesktopDir&"/newAU3record.au3",2) ; CREATES A NEW FILE - PUT WHERE YOU WANT FileWrite($newFile,$newString) ; writes contents of new string with delays to file FileClose($newFile); closes flile EndFunc _changeSpeed($file) ; runs the function Edited September 7, 2022 by Jfish Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
uhhuy055 Posted September 9, 2022 Author Share Posted September 9, 2022 (edited) It's because when I use the code from your first 2 posts nothing happens after I close this thing. It doesn't save it as a new file. So I copy and paste it. That's when the lines ------- appear. With the code from your 3rd post it creates a new file after I close this and that file has no ------ lines. Thank you very much for the script Edited September 9, 2022 by uhhuy055 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