Windows manipulation extension

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Windows manipulation extension

#1 Post by dx876234 » Mon Aug 20, 2012 10:02 am

I've written a small utility extension to resize and move the bot windows, I mainly use it for the client window.

This implements as two functions; mmext.ResizeWindow(HWND, width, height) and mmext.MoveWindow(HWND, x, y). The implementation is a .dll which interfaces the correspondint win32 calls. Both a compiled version and source code is attached.

Usage

You can compile by executing the attached makefile (a GNU environment is expected) or use the dll supplied directly (not recommended for security reasons).

The mmext.dll should be placed in the micromacro/lib/mods directory and the userfunctions in the standard userfunctions directory.

The HWND argument is the standard value returned from getAttachedHwnd() or getHwnd().

ex to make small window and move it out of the way:

Code: Select all

mmext.ResizeWindow(getAttachedHwnd(), 300, 200)
mmext.MoveWindow(getAttachedHwnd(), 0, 0)
Hope its usefull.

Best regards
DX
Attachments
mmext.zip
(15.47 KiB) Downloaded 167 times

_hirondelle
Posts: 72
Joined: Thu Mar 08, 2012 7:22 am

Re: Windows manipulation extension

#2 Post by _hirondelle » Mon Aug 20, 2012 10:39 am

I don't doubt about the utility you've with this program but...

I don't see why it's useful :s

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Windows manipulation extension

#3 Post by dx876234 » Mon Aug 20, 2012 11:00 am

Then dont use it :)

I use for managing 10+ client windows, ordering them in a grid for better overview.

-dx

User avatar
attackspeedzero
Posts: 28
Joined: Sat Mar 02, 2013 6:24 pm

Re: Windows manipulation extension

#4 Post by attackspeedzero » Sat Mar 30, 2013 1:17 am

Thanks for this! Every time I load up a new window I'm always moving and resizing it. Much easier now!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Windows manipulation extension

#5 Post by rock5 » Sat Mar 30, 2013 3:16 am

Micromacro has a new function.
* Added function setWindowPos() to change the position, width/height, and always-on-top of a specified window.
http://www.solarstrike.net/wiki/index.p ... wPos.28.29
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

farmforever
Posts: 13
Joined: Thu Jan 24, 2013 11:28 am

Re: Windows manipulation extension

#6 Post by farmforever » Sun Mar 31, 2013 1:32 pm

this function look too complicated, how to use it with multiple bots ? how to rename each RoM windows b4 it call the function ? is there any other function for that ? im kinda lost here

EX:

Code: Select all

<onLoad><![CDATA[
number findWindow(Runes of Magic)
mmwin = getHwnd();
setWindowName(mmwin, "my character name");
setWindowPos(my character name, wx, wy, ww, wh, t)
]]></onLoad>
fail

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest