Page 1 of 1

Windows manipulation extension

Posted: Mon Aug 20, 2012 10:02 am
by dx876234
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

Re: Windows manipulation extension

Posted: Mon Aug 20, 2012 10:39 am
by _hirondelle
I don't doubt about the utility you've with this program but...

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

Re: Windows manipulation extension

Posted: Mon Aug 20, 2012 11:00 am
by dx876234
Then dont use it :)

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

-dx

Re: Windows manipulation extension

Posted: Sat Mar 30, 2013 1:17 am
by attackspeedzero
Thanks for this! Every time I load up a new window I'm always moving and resizing it. Much easier now!

Re: Windows manipulation extension

Posted: Sat Mar 30, 2013 3:16 am
by rock5
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

Re: Windows manipulation extension

Posted: Sun Mar 31, 2013 1:32 pm
by farmforever
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