Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Messagebox-Creator


  • Please log in to reply
27 replies to this topic
Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
This little program was written to design Messageboxes faster.
I often use them and I already have the most important numbers in my mind, but it is much nicer this way...

When the program is minimized it remains as Tray-Icon to save place. A single click onto the icon is enough to restore it.
Context Menu may also me used...
The Tray-Icons Context Menu also offers a "Reset"-Option to remove all user-input...

You can enter the messagebox-text in more than one line. A linebreak is automatically translated to "`n".
A realtime result can be found at the bottom-part of the GUI.

A "Timeout" of "-1" is interpreted as "not used". Both kinds of decimalpoint "." and "," can be used.

The other options should be self-explanatory..

Code for 2 variants can be retreived here:
http://www.autohotke...9392.html#99392
A german version has been done by ┬░digit┬░ here.

Thalon

jballi
  • Members
  • 1022 posts
  • Last active:
  • Joined: 01 Oct 2005
Excellent idea! :D I like the test button so that you can instantly see your new MsgBox creation.

Just in case you didn't know, Chris has added a few new options to the MsgBox and IfMsgBox statements in the latest release of AHK. There is a new Always-On-Top option that I like a lot better than System Modal simply because it doesn't include that fracken blank icon in the title bar. In addition, there is a new "Cancel/Try Again/Continue" group of buttons available. Check it out: http://www.autohotke...ands/MsgBox.htm

Them be my thoughts...

Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
Thx, I wasn't aware of this options!
I'll add them tomorrow!

Thalon

Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
I had some time in work, so I added it today ;)

Thalon

d-man
  • Members
  • 289 posts
  • Last active: Sep 21 2013 08:09 PM
  • Joined: 08 Jun 2006
That's a very interesting idea! kind of like smartgui for messageboxes.

userabuser
  • Members
  • 32 posts
  • Last active: Mar 12 2014 03:24 AM
  • Joined: 15 Jul 2006
Another keeper added to my "favorites" collection!

I did change it to make it open minimized though.

I also did not know you could do this.
Menu, Tray, Click, 1

Not only is it very useful, but it shows very clearly how to make radio, input boxes, etc..

Thanks!

userabuser
  • Members
  • 32 posts
  • Last active: Mar 12 2014 03:24 AM
  • Joined: 15 Jul 2006
Heck, while I'm playing with it.
You may like to change the c:\windows entries to %A_WinDir% to make it more portable. I wouldn't pick at it, except that I like it! :)

One more thing I learned was your very elegant solution to "minimize to tray" I remember a while back I looked all over for this solution and finally "rolled my own". I wish, when you searched the docs for the word "minimize", that this solution would come up.

GuiSize:
if A_EventInfo = 1
Gui, Show, Hide
return

Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
Thank you for feedback.
I have updated "A_WinDir"...

If there are any points missing please let me know!

Not only is it very useful, but it shows very clearly how to make radio, input boxes, etc..

It is my own style for creating GUIs. This way it is easily possible to move Groupboxes with there related controls around whereever I want.
I'm glad if it's also a way for you!

One more thing I learned was your very elegant solution to "minimize to tray"

I searched also around about one year ago and didn't find anything. This is my final solution I already used in some other scripts. I tried several versions, but I like this most - few lines of code and simple handling.

Thalon

Conquer
  • Members
  • 385 posts
  • Last active: Jan 10 2013 02:14 AM
  • Joined: 27 Jun 2006
Error in your script:

My screen resoultion is smaller than your GUI, so I dont get the Alignment section or the Test/Copy to clipboard buttons.


But congrats, nice job! :wink:

Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
What screen-resolution do you use? :shock:
640x480?

In this case it should be easily possible to rearrange the groupboxes.
The GUI is designed to be very flexible. You would only have to adjust the missing parts right beside the others.

For example replace the following (only "x" and "y" is affected):
Gui, Add, Groupbox, x10 y385 h95 w340 section, Buttons
by
Gui, Add, Groupbox, x360 y10 h95 w340 section, Buttons
---
Gui, Add, Groupbox, x10 y490 h45 w230 section, Default-Button
by
Gui, Add, Groupbox, x360 y115 h45 w230 section, Default-Button
---
Gui, Add, Groupbox, x260 y490 h45 w90 section, Timeout
by
Gui, Add, Groupbox, x610 y115 h45 w90 section, Timeout
---
Gui, Add, Groupbox, x10 y545 w230 h45 section, Allignment
by
Gui, Add, Groupbox, x360 y170 w230 h45 section, Allignment
and
Gui, Add, Groupbox, x10 y600 w340 h95 section, Result
by
Gui, Add, Groupbox, x360 y225 w340 h95 section, Result
I hope this will solve it for you ;)

Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
A little mistake was done: I had forgotten to escape "," and ";".
It's corrected now (see first post).

Thalon

userabuser
  • Members
  • 32 posts
  • Last active: Mar 12 2014 03:24 AM
  • Joined: 15 Jul 2006
Gui, Add, Button, xs+60 ys+60 h30 w40 Default gReset, Reset

If your going to keep messin with it. Put the reset on the bottom of the page. :)

I just used it on a huge script.. Made my script messages look much better. Was fast and easy to do.

I may add an option after copying to the clipboard to reset. Or better yet, a checkbox to "reset after clipboard" option.. hmmm

Thalon
  • Members
  • 641 posts
  • Last active: Feb 25 2014 03:12 PM
  • Joined: 12 Jul 2005
@userabuser
I wanted to add the Reset-Button to GUI as I did come here :D

I have also added the (optional) possibility of a Ini-File for Configurations like Default-Values for "Reset".

I added a option to automatically reset the GUI after pressing the "Copy to Clipboard"-Button as it was your idea!

Thalon

Conquer
  • Members
  • 385 posts
  • Last active: Jan 10 2013 02:14 AM
  • Joined: 27 Jun 2006
No, im running on 800 x 600.

I personally re aranged controls to make it maximized and fit all on the screen. Thx for the handy script.

Joy2DWorld
  • Members
  • 562 posts
  • Last active: Jun 30 2014 07:48 PM
  • Joined: 04 Dec 2006
nice.