I've been working on this script on and off for a few days now, I thought that it was my VM set up that was crashing it but I've come to the realization that it's actually the script itself crashing the game when it runs for too long. I tested this by restarting the script after an hour and it lasted much longer than if I just left it running.
I'd appreciate some help to figure out the cause, if possible I'd like to be able to run the script for at least 8 hours at a time.
I run 2 virtual machines, each has its own assigned 6 cores clocked at 4.2ghz and 4 gigs of ram to use so I don't see resources being too much of an issue, but when I run the script for that long the game starts stuttering like hell and eventually freezes all together with no crash report, I can run the game non stop without the script running.
Before you read I know it looks janky as hell but it's the only way I could get the game to recognize an input, I tried many other various things to no avail, the game does not accept a constant key down input you have to keep repeating that input for anything to actually happen ingame.
At first I thought it was because the CPU couldn't catch up since only one of the VM's was crashing so I added a bunch of sleep functions but that didn't help too much.
Thank you.
Code: Select all
l::
ExitApp
p::
Loop,
{
Sleep, 5000
Loop, 100
{
ControlSend,, {w down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {w down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {w down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {w down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {s down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {s down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {s down}, Phantasy Star Online 2
}
Sleep, 5000
Loop, 100
{
ControlSend,, {s down}, Phantasy Star Online 2
}
}