Sign in to follow this  
Followers 0
sness

Memo display, edit mode

4 posts in this topic

Hey there everyone.

Is there a way to retrieve text in a file and display it in a window on a custom GUI so the user can cut and paste the text into a document of their choice? I envision a text box with a scroll bar if too large to fit in the area provided.

Thanks for your guidance on this.

Sue

Share this post


Link to post
Share on other sites



Thanks every body. I figured it out.

Share this post


Link to post
Share on other sites

Hey there everyone.

Is there a way to retrieve text in a file and display it in a window on a custom GUI so the user can cut and paste the text into a document of their choice? I envision a text box with a scroll bar if too large to fit in the area provided.

Thanks for your guidance on this.

Sue

Hi Sue,

I am new to Autoit and have been looking for help to do exactly what you have mentioned. Is it possible for you to post the code you used to display text in a scrolling text box?

Thanks

Alan :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi Sue,

I am new to Autoit and have been looking for help to do exactly what you have mentioned. Is it possible for you to post the code you used to display text in a scrolling text box?

Thanks

Alan :)

This will do the trick

#include <GUIConstants.au3>

$textfile = FileOpen("C:\boot.ini",0) ;Any text file will work
$text = FileRead($textfile)
FileClose($textfile)

GUICreate("Displaying a text file" , 400,400)

GUICtrlCreateEdit($text,5,5,390,390)
GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        ExitLoop
    EndIf
WEnd
Edited by arcticflame

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