Positioned msgbox, relative-positioned inputbox/msgbox

Propose new features and changes
xyz

Positioned msgbox, relative-positioned inputbox/msgbox

02 Oct 2017, 07:23

A

This has been a recurrent subject for more than 10 years, a msgbox with x,y positions.

Since the inputbox got such positioning, it's thoroughly beyond any possible understanding why the msgbox has never got positioning; for compatibility reasons with old scripts it would be so easy to just put optional commata behind the CORE msgbox command, ready to process posx and posy.

Alternative: put the posx and posy into the "options", within the NEWER (amended, alternative) msgbox command, with leading "x" respective "y", and without commata.

Yes, I found all detours, with winmove and timer, and I even found the Windows-internals-accessing scriptlet (not speaking of the "make your own gui" advice finds), but msgboxes should be accessible by a simple, straightwordward command, not totally clutter your script by unneeded, additional code.

The real need for positioning arises whenever you work on more than one screen, which is probably the case for most AHK users.

B

Even for the inputbox command, there is not provided any relative positioning (which would also be so welcome then for msgbox), and it's evident that for 2-or-more screen setups, positioning relative to the currently-active window would be so welcome.

The syntax would be very simple to handle: ", N, N" (N meaning a digit) would be the absolute position, ", rN, rN" would denominate relative x/y positions, at the end of the command string; the same within the "options" of the msgbox command: "... xN yN ..." would be absolute positions, "... xrN yrN ..." would be positions relative to the active window (or rxN and ryN if you prefer).

Of course, for different screen set-ups, you could use global vars instead, in order to get simili-relative positions:

Code: Select all

if setup = 1 ; default, 1-screen
{
boxx = 100
boxy = 100
}
else if setup = 2 ; some other setup
{
boxx = 1400
boxy = -300
}
else ...

; And then
inputbox, ... , %boxx%, %boxy" ; similar for msgbox
Or you could even check the position of the active window every time, then use boxx := posx + 300 and boxy := posy + 300 or whatever (most of the time, the same position for inputbox and msgbox would be fine), and then use posx/y within the commands, but that should be used for special cases; in all ordinary cases, the ubiquitous commands inputbox and msgbox should remain simple and 1-line.

C

While relative positioning would ask for a little bit of additional coding, it's evident that msgbox (absolute, inputbox-like) positioning would be oh so very simple to implement, and that's why I'd kindly ask for some explanation if the implementation of that very basic feature is bound to be withheld even longer. Thank you very much, and I'm sure I speak here for almost all of us.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 36 guests