Wednesday, March 22, 2017

What I've been working on today: Scripts in AutoHotKey program.

I had a problem.
There was work I needed to do in the Final Fantasy X HD Remaster (Steam), and all I had to do was press C over and over and over again.
The first thing I did was buy a program for $5 called AutoKeyboard. I learned the program, and suffice it to say, it did not work. I'm still deciding if I want my money back.
The second thing I did was install a 2nd program called "Auto Keyboard Presser." It looks a lot smarter than the previous program, but it sure was buggy. There were so many bugs that just getting it to accept some keys to press down took minutes of your time, and then never worked. They also wanted to be paid, but I didn't do so this time.
The third thing I tried was from the professionals: AutoHotKey

It didn't work for quite some time, but after 30 minutes of learning and copying, I discovered a way to make AHK work for Final Fantasy X HD Remastered.
Part of that process was when I downloaded an app called "Send and Click Tool, V4.1." which proved to me that AHK was smart enough to overcome the game's mechanics, if I was smart enough to write down the results and learn to script it. What I actually did was to familiarize myself with it. Then in frustration, I found another AHK user who is playing Final Fantasy X HD Remastered (Steam). I copied their script, and I modified it several times until it would work, and then it finally did work!!!!

Here is my first, non-working script. [the script does work, but the game is protected against it, so it failed.]

#Persistent
SetTimer, PressTheKey, 1500
Return
PressTheKey:
Send, c
Return


And here is her full script:

#NoEnv SetWorkingDir %A_ScriptDir% CoordMode, Mouse, Window SendMode Input #SingleInstance Force SetTitleMatchMode 2 #WinActivateForce SetControlDelay 1 SetWinDelay 0 SetKeyDelay -1 SetMouseDelay -1 SetBatchLines -1 ; UserGlobalVars F6:: Macro1: Loop { CoordMode, Pixel, Screen PixelSearch, FoundX, FoundY, 1900, 1060, 1920, 1080, 0x646171, 20, Fast RGB If ErrorLevel = 0 { Sleep 20 Send, {c down} Sleep 50 Send, {c up} Sleep 250 } } Return


And here is my final code, after combining both of ours.
[The credit goes to D3Construct]

#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
; UserGlobalVars
F6::
Macro1:
Loop
{
Sleep 20
Send, {c down}
Sleep 50
    Send, {c up}
    Sleep 250
}
Return
So what does this script do? Most of the top language
is what makes it work inside Final Fantasy X HD
Remastered (Steam). My simple script did in fact work
, but it only worked in documents and programs which
did not prevent basic levels of cheating.My script
allows a person who has near-infinite items on their
FFX HD, to use the C key over and over and over,
usually on something like "Attribute Sphere" or on
"Special Sphere." If you do it by hand, it will take
at least 30 minutes to mostly get all of the other
attributes from the sphere grid. With this script, it
will take 20 minutes, AND you don't have to be there
.To use this, again, you should have near-infinite
amounts of "Attribute Sphere" and "Special Sphere,"
and maybe also "Black Magic Sphere," "White magic
Sphere," and "Skill Sphere".
And I can't finish
without giving credit to the original article that
brought me to AutoHotKey: How-To Geek !!!!I hope
that if anyone has this issue with Final Fantasy X HD
Remastered (Steam) for PC, that I can help them.
My google searches:
Spam a key in a game
Repeat Keystroke in a game
Windows program to spam Enter key
Thank you for reading this, everyone!! ~Mindus Azrael
Debsin, SJB-C


P.S. Everything is broken in blogger today, probably
because I entered code. Or maybe before that. Just
today Google notifed me that they had new templates
to try out. I bet Google messed something big up.
!!! :( I might come back in a day or two and try to
get this fixed. However, if you copy/paste the whole
post, you will probably get everything. Make sure
you paste into word to preserve the URLs. !!

No comments:

Post a Comment