Jump to content
Sign in to follow this  

Put text into GUI

Recommended Posts


OK, I am still learning GUI stuff.

So, here is what I would like to do:

Make a GUI with a "text box"

the "text box" will be a large box that will display data collected by various calls. Right now I am monitoring the battery of a laptop so need to build a string and display it. In this "text box" it DO NOT care if I can scroll. It is for display purposes only.

Oh, yeah, the text displayed will be hopefully saved to a file (I can deal with that I think).

So, If y'all could help me figure out how to do the GUI Text display it would be greatly appreciated.



Share this post

Link to post
Share on other sites

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

Opt('MustDeclareVars', 1)

Local $myedit, $msg

GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered

$myedit = GUICtrlCreateEdit("First line" & @CRLF, 176, 32, 121, 97, $ES_AUTOVSCROLL + $WS_VSCROLL)


GUICtrlSetData($myedit, "Second line")

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.