Hello everyone,
I have been building a script, actually a group of several scripts, that run alongside a flight simulator. I use it to control various things in the simulator more realistically. The are compiled as exes, most of them use #Include ClassMemory, have a couple dozen timers between them all, a few hotkeys, and does some reading and writing to memory and plays sound files. It tends to lag by a second or two sometimes, but other times it runs just fine. Sometimes when my scripts are lagging it will cause the simulator to crash to desktop. I'm trying to think of what might cause this behavior. I know the individual things I have it doing work fine. Others I've sent these scripts to haven't reported this issue. I'm not really sure even what questions to ask or where to start trouble shooting? Thanks for any help.
Dan
Lagging Script
Re: Lagging Script
If the game (incidentally) bottlenecks at your PC's resources, AHK will runn slower too. Try adding Process,Priority,,A to the script to bump it's priority, and see if that makes any difference.
Re: Lagging Script
writing garbage to memory can crash ur stuff
if it doesnt crash for others, identify whats different about their setup and how theyre using the script
other than that, dont hope for a clear-cut answer. all uve said is u have a thing X that does Y and occasionally Zs, with no particulars
if it doesnt crash for others, identify whats different about their setup and how theyre using the script
other than that, dont hope for a clear-cut answer. all uve said is u have a thing X that does Y and occasionally Zs, with no particulars
Re: Lagging Script
- What OS do you/they use?
- Do you use x64/x32 AutoHotkey?
- Do you use other scripts/programs at the same time?
- Virus checkers maybe?
- Maybe newer PCs have more problems for some reason. (Windows 10 updates always seem to cause people problems.)
- You can check Task Manager and other diagnostic tools.
- Do you/they use special hardware e.g. graphics cards, you could look them up.
- Any general reason that a PC might be slow, including low free disk space.
Script Performance - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=62096
advice for speeding up a very slow PC - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=17&t=32030
- Do you use x64/x32 AutoHotkey?
- Do you use other scripts/programs at the same time?
- Virus checkers maybe?
- Maybe newer PCs have more problems for some reason. (Windows 10 updates always seem to cause people problems.)
- You can check Task Manager and other diagnostic tools.
- Do you/they use special hardware e.g. graphics cards, you could look them up.
- Any general reason that a PC might be slow, including low free disk space.
Script Performance - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=62096
advice for speeding up a very slow PC - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=17&t=32030
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Lagging Script
Thanks for the replies.
I'm already using high priority, thanks though.
I'm pretty confident that only valid values are being written to memory. Don't worry, I'm just looking for general troubleshooting routes for improving performance.
-I'm on Win7, they use Win10.
-Using 32bit AHK as the simulator is 32bit as well.
-Several AHK scripts, compiled as exe are working together to do various things in the simulator.
-Anti-virus is disabled when testing.
-C drive still has 168GB free.
I've noticed that the lag seems to show up when a sound is supposed to be played, and when it happens it effects all the scripts. For example, I can be doing something in the sim that causes a sound to be played repeatedly (so far so good). At some point the sound stops when it should still be playing. It might take 5 seconds or so before correct operation resumes and the sounds begins playing again. If during the time it isn't working I happen to do something that uses a function from a different script, that function will behave normally until it has to play a sound file (a different one than the one the other script should be playing) at which point the second script hangs until normal operation spontaneously returns as described above, at which point the sound plays and the function continues normally.
I'm already using high priority, thanks though.
I'm pretty confident that only valid values are being written to memory. Don't worry, I'm just looking for general troubleshooting routes for improving performance.
-I'm on Win7, they use Win10.
-Using 32bit AHK as the simulator is 32bit as well.
-Several AHK scripts, compiled as exe are working together to do various things in the simulator.
-Anti-virus is disabled when testing.
-C drive still has 168GB free.
I've noticed that the lag seems to show up when a sound is supposed to be played, and when it happens it effects all the scripts. For example, I can be doing something in the sim that causes a sound to be played repeatedly (so far so good). At some point the sound stops when it should still be playing. It might take 5 seconds or so before correct operation resumes and the sounds begins playing again. If during the time it isn't working I happen to do something that uses a function from a different script, that function will behave normally until it has to play a sound file (a different one than the one the other script should be playing) at which point the second script hangs until normal operation spontaneously returns as described above, at which point the sound plays and the function continues normally.