• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Question - Can Bags Be Positioned Programmatically? (1 Viewer)

Joined
Jan 29, 2023
RedCents
191¢
I want to write a script that repositions my bags (inventory and bank) into nicely aligned rows. I want this because I grow tired of moving all my bags every time I change one bag in my inventory or bank.

Is it possible to move windows from a script? Are there any examples of doing this? I see that the mqconsole -> Windows inspector has +- keys to move and resize windows. Can I access that logic somewhere or is it compiled?

Secondary questions: I see that all of the bag windows are just called "ContainerWindow". Is there a way to iterate multiple windows with the same name? Is there a way to know which inventory slot each ContainerWindow is associated with?

Thanks
 
Solution
With some quick testing this seems possible
INI:
Dec 08 2020
- Added .Move to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].Move[100,200,300,400]} ([x,y,width,height])
    Omitting a parameter will use the existing value
- Added .SetBGColor to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].SetBGColor[FF000000]} ([argb])
- Added .SetAlpha to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].SetAlpha[255]} (0-255)
- Added .SetFadeAlpha to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].SetFadeAlpha[255]} (0-255)

opening each bag in turn and using something like this:
/invoke ${Window[ContainerWindow].Move[1000,0,${Window[ContainerWindow].Width},${Window[ContainerWindow].Height}]}

will move the containerwindow that is showing currently

can open and close...
With some quick testing this seems possible
INI:
Dec 08 2020
- Added .Move to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].Move[100,200,300,400]} ([x,y,width,height])
    Omitting a parameter will use the existing value
- Added .SetBGColor to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].SetBGColor[FF000000]} ([argb])
- Added .SetAlpha to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].SetAlpha[255]} (0-255)
- Added .SetFadeAlpha to the Window TLO Methods
    Usage: /invoke ${Window[GroupWindow].SetFadeAlpha[255]} (0-255)

opening each bag in turn and using something like this:
/invoke ${Window[ContainerWindow].Move[1000,0,${Window[ContainerWindow].Width},${Window[ContainerWindow].Height}]}

will move the containerwindow that is showing currently

can open and close the bag windows with

/itemnotify 23 rightmouseup

where the 23 is inventorybag 1 and then 32 is inventorybag 10

INI:
ItemSlot Inventory
+----+----+
| 23 | 24 |
+----+----+
| 25 | 26 |
+----+----+
| 27 | 28 |
+----+----+
| 29 | 30 |
+----+----+
| 31 | 32 |
+----+----+
 
Solution
Sorry, follow-up question...

How should I have been able to find this info on my own? Maybe I'm looking in the wrong place. I generally browse the docs.macroquest.org pages and I specifically looked here for Window info: https://docs.macroquest.org/reference/data-types/datatype-window/

Is this "Move" command an RG add-on? Or undocumented MQ functionality? Or me looking in the wrong place? Thanks.
i sorta remembered something about it, and looked in the patch notes for it, and pasted the section from the notes
 
Another follow-up question. My script is working well now. It doesn't resize bags, but moves them to be nicely lined up. I've tested it on 4 characters. It works perfectly on 3 of them. On the 4th one I see it moving all of the bags to the correct position (I added delays so I can see what is going on), however, once the script is done running the bags are still in their starting positions. This is mystifying me. The bag locations aren't locked. When I move the bags manually they behave correctly. But the script can't seem to get the movements to get locked in. I'm at a total loss at this point. Thanks.
 
Question - Can Bags Be Positioned Programmatically?

Users who are viewing this thread

Back
Top