Jump to content

Need to make a Window to log information


Recommended Posts

Hello. I need to make a text window that has a scrollable option, so that I can log my programs progress.

How would i make such a window, and also how would I add a line of information to this window?

Thanks a bunch

MajSlayer420

Something like:

#include <GUIConstants.au3>

$hGUI = GUICreate("EventLog", 400, 300)
$iMemo = GUICtrlCreateEdit("", 2, 2, 396, 296)
GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
GUISetState()

MemoWrite("Hello world")

do
until GUIGetMsg() = $GUI_EVENT_CLOSE

Func MemoWrite($sMessage)
  GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc
Edited by PaulIA
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

Thats almost perfect. But I forgot to tell y'all that the kind of text box I want doesnt have its own window.. I just want a white box basicly, with the slider.

Is that possible?

MajSlayer420

The edit control has to be placed on some kind of window, but you can fool around with the window styles (via GUICreate) to make the window so that it just has a solid border.

Were you thinking that this thing would be a window that is independent of your application? If so, it will need to be it's own app that you could "talk to" to send debug messages. I've done this sort of thing for Auto3Lib when I want to view debug messages in real time while my app is running.

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

  • Moderators

I hate to ask the obvious, but rather than wasting Pauls time... do you have any code what so ever that anyone can look at... because your explanation of what you want is not very good.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

No not really.

Currently my program just prints its current state using a label. I want this text to be logged into a window of text without borders or open and close buttons/icons.

Just like the text box you use to reply to a message. Cant describe it any better than what your looking at when you type a reply in.

Thanks

MajSlayer420

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...