Sign in to follow this  
Followers 0
JohnDool

Text in a window?

6 posts in this topic

Hello,

I'm just starting with autoit. I have a question. How can I show a lot of text in a window, as information? By Creating a label you can't show much informatie. But that is what I want! How can I show the text in a window?

Can I make a text file, and displayed the text of the file in a window?

I hope somebody can help me.

Thanks a lot.

John

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

maybe... GUICtrlCreateInput ?

[edit] scratch that.. I meant GUICtrlCreateEdit as azure pointed out.

Edited by SpookMeister

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

GUICtrlCreateEdit

Share this post


Link to post
Share on other sites

@JohnDool

You can do it with label, just resize it ...

$win=GuiCreate("GUI",500,500)
$lbl=GuiCtrlCreateLabel("",5,5,490,490)
GuiSetState(@SW_SHOW,$win)

GuiCtrlSetData($lbl,"insert here your big text")

Or use edit :

#Include <EditConstants.au3>

GuiCreate("GUI",500,500)
$edit=GuiCtrlCreateEdit("",5,5,490,490,$ES_MULTILINE+$ES_AUTOVSCROLL+$ES_AUTOHSCROLL)
GuiSetState()

GuiCtrlSetData($edit,"put here your big text")

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

@JohnDool

You can do it with label, just resize it ...

$win=GuiCreate("GUI",500,500)
$lbl=GuiCtrlCreateLabel("",5,5,490,490)
GuiSetState(@SW_SHOW,$win)

GuiCtrlSetData($lbl,"insert here your big text")

Or use edit :

#Include <EditConstants.au3>

GuiCreate("GUI",500,500)
$edit=GuiCtrlCreateEdit("",5,5,490,490,$ES_MULTILINE+$ES_AUTOVSCROLL+$ES_AUTOHSCROLL)
GuiSetState()

GuiCtrlSetData($edit,"put here your big text")

Cheers, FireFox.

Thanks for answer! I tried and I understand how it work. But I'm very unpleasant... Because my text add punctuation marks and calculations. How can I show that in a window or GUI? Is that possible? Or have I to program with HTML or PHP? Is it possible to show a textfile with al the punctuation marks and calculations in a GUI?

My second question: wich control can I make formulas?

Thanks for helping me.

Kind regards,

John

Share this post


Link to post
Share on other sites

#Include <EditConstants.au3>

GuiCreate("GUI",500,500)
$edit=GuiCtrlCreateEdit("",5,5,490,490,$ES_MULTILINE+$ES_AUTOVSCROLL+$ES_AUTOHSCROLL)
GuiSetState()

GuiCtrlSetData($edit,FileRead("yourfile.ext"))

For calc look at Number()

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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