Hello! I'm just getting started with AHK and am absolutely loving it! It's a lot of fun to mess around and discover new possibilities with.
Ok, on now to the question at hand...
Description:
I'm working on a script that is organizational in nature. My character performs an action, an item is, at times, collected into its inventory. The chance of the item being collected into the inventory is, of course, based on the game's algorithmic check and balances behind the scenes.
So, basically, I'm looking for a way for my script to be able to recognize that an item has been gathered into my inventory and, to which location (X, Y) in the inventory it was moved.
The various items, for the most part, have differing icons. My focus, for now, is on these that are more easily recognizable due to the differing icons.
So, of course, I was looking through the help files and a couple script examples others have done. The script examples I have available to study do not do anything of the sort, and are more simplistic than even what I'm describing here. I see possibilities within the help files, but am at a loss as to how to most effectively perform this task.
My initial idea was to have the recognition based on the color value, but that presents its own problems.
Task Breakdown:
Item moves into a slot within character's inventory
Script needs to recognize the item itself, as well as the exact screen position of the new item
If new item at X,Y location is item B, for example, the script would perform an action (ie. MouseClickDrag, etc.)
If script knows that no new items are in the character's inventory, at this point in the loop, it performs the appropriate action
Current Questions:
What would be the most effective functions, commands, etc. to use in order to have the script be able to:
- recognize a new item is in the character's inventory at a predetermined time in the loop?
- recognize the location of the new item within the character's inventory?
- recognize the "identity" of only the new item?