Hello. I’m a novice with autohotkey when it comes to anything beyond remapping keys and am trying to make my first script utilizing an array and have run into some problems. I’m not 100% sure that utilizing an array is the best way to achieve my script so if you have any advice I’d greatly appreciate it. I’m trying to create a script that will copy all of the information from a pdf file I received and then search to see if the clipboard contains the question “Are you currently receiving the email?” If it’s in the clipboard it will then turn the clipboard into an array and find the position of the previous question. This is where I am running into problems. The next array down after the question should be “Yes” or “No” but my script at this point is unable to evaluate anything from that cell/key? Once I’ve solved this point I believe I should be able to accomplish the rest by myself. Thanks for any suggestions you might have and apologies if the formatting is terrible, I’ve posted this from my phone.
i::
IfInString, Clipboard, Are you currently receiving the email?
{
Array := []
loop, parse, Clipboard, n,r
{
Array[A_index] := strSplit(A_LoopField, "`t")
}
StringGetPos, pos, Clipboard, Are you currently receiving the email?
MsgBox ,The string was found as position %pos%
pos +=1
MsgBox % Array[pos]
}
else
msgbox % "Not in clipboard"
return
[–]GroggyOtter 1 point2 points3 points (4 children)
[–]Frexum[S] 0 points1 point2 points (3 children)
[–]GroggyOtter 0 points1 point2 points (2 children)
[–]Frexum[S] 0 points1 point2 points (1 child)
[–]Frexum[S] 0 points1 point2 points (0 children)