Sign in to follow this  
Followers 0
MajSlayer420

Need to make a Window to log information

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

No I wanted it to run in within my apps window. and not use a seperate program.

What I want is basicly the same window type im using now to write this message.

Thanks again,

MajSlayer420

Share this post


Link to post
Share on other sites

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.


[center]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.[/center]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

My bad I found what i needed

CODE

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

Thanks you pointed me in the right direction

MajSlayer420

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  
Followers 0