AutoHotKey Script to target InfoLine Description?

I’m asking why you’re using gosub instead of putting it on one line.

ahk Send just sends the keystrokes one after the other just as if they were typed on the keyboard by a human. But faster.

tbh, I still have no idea.

I just looked at what AHK forum dude gave me as options and it seemed like the second one was simpler and I sort of immediately understood that the Gosub was somehow referencing the already existing command to piggyback the new one.

The other option he gave me, was just a jumble of code language I didn’t get on first glance.

edit

Not sure how

relates? Where is the ^!i{tab} coming from or for?

I doubt there is any difference or advantage? I’m not sure. I like the one I chose though because it visually resembled a macro which I’m accustomed to and is easy to see in the script.

edit

I don’t think linebreaks do anything in AHK if that’s what you’re asking, it’s just a visual organization preference… some people like things flowing top to bottom bundled in paragraphs, some like left to right.

In a way line feeds have a kind of meaning in ahk, but it’s more about what it finds on the next line.

ahk will evaluate the next lines until it sees return at which point it either exits, or goes back to the top of the script and starts again.

If the command is written all on one line, and ahk doesn’t find a return on the next, ahk goes back to the top and loops the script some more. Looping, rather than just running the script once and exiting is what #SingleInstance Force accomplishes.

ahk interprets everything after Send, as
press ctrl and alt, press i, press tab, release all

Oh okay good info…

I’m at the stage of farming other peoples bits of script without really understanding what’s going on, so can’t tell you why he gave me the second script, but it looked simpler to me and that’s why I picked it (and it seems to work without fault)

They are equivalent, but when you go back to edit them later after you have 200 of them, it will be a cluster@$#%

1 Like