With inventory panel open, but no bags open, want to pick up 1 of a stack of items from the bag onto my cursor - basic stuff. This seems like it shouldn't be an issue. With /finditem, if an item is in a bag, the bag is opened and $getlasterror is set to FIND_PACKNOTOPEN. So.....
Code: Select all
|testfind.mac
Sub Main
:getitem
/sendkey down ctrl
/finditem "@Param0"
/sendkey up ctrl
/echo $getlasterror
/if "$getlasterror"~~"NOTOPEN" /goto :getitem
/return
When the above is called as /mac testfind "bat wing", the macro enters an infinite loop - the cursor moves to and stays on pack 0, 'FIND_PACKNOTOPEN' is echoed continuously, and that's it.
It looks like "/finditem" does not like the ctrl key to be depressed when it needs to open a bag. testing this directly backs this up -- type /finditem "bat wing" - hold down ctrl - hit enter -- The cursor moves to pack 0, does not open bag.
As a point to note, ctrl+right click will fails to open a bag. Is this just an artifact of the EQ UI?
The work around is easy enough:
Code: Select all
Sub Main
:getitem
/sendkey down ctrl
/finditem "@Param0"
/sendkey up ctrl
/echo $getlasterror
[color=red]/if "$getlasterror"~~"NOTOPEN" {
/finditem "@Param0"
/goto :getitem
}[/color]
/return
