Page 7 of 7

Re: How to optimize the speed of a script as much as possible.

Posted: 29 Oct 2023, 19:27
by WAZAAAAA
Xendrus wrote:
01 Aug 2023, 15:53
SetBatchLines, -1 Causes my games to completely freeze to 0 fps until the key is released.
as mentioned by Animan8000 and by point #5 of the thread, you're pressing buttons too fast and your game can't handle it, you need to slow down
5. The default SetBatchLines value makes your script sleep around 10-15.6 milliseconds every line. Make it -1 to not sleep (but remember to include at least one Sleep in your loops to avoid high CPU waste!).
quick solution, just add this line inside of your "freezing loop":
DllCall("Sleep","UInt",1)

Re: How to optimize the speed of a script as much as possible.

Posted: 13 Nov 2023, 15:45
by LuisPro
Hello, using ahk v2 changed something? something should i not use or something use in different way?

@WAZAAAAA
Can you or someone else provide this for ahk v2?

Greetings.

Re: How to optimize the speed of a script as much as possible.

Posted: 17 Nov 2023, 01:14
by WAZAAAAA
LuisPro wrote:
13 Nov 2023, 15:45
Hello, using ahk v2 changed something? something should i not use or something use in different way?

@WAZAAAAA
Can you or someone else provide this for ahk v2?

Greetings.
To be honest this kind of thread is less needed for AHK v2 since the 2 most important lines SetBatchLines and SendMode (among others) now use better defaults.

But still, here it is viewtopic.php?p=559263