Sign in to follow this  
Followers 0
doohoodogg

too long

11 posts in this topic

Hy, i have a GUI and a text that is too long, i mean is getting out, and i wanna know how to wrap it ?

i saw something with @CR but its not working, imean the "@CR" is shown in the text on the GUI.

If possible i, wanna make the text line one below another, u know , like my post in here.

thx

Share this post


Link to post
Share on other sites



Hy, i have a GUI and a text that is too long, i mean is getting out, and i wanna know how to wrap it ?

i saw something with @CR but its not working, imean the "@CR" is shown in the text on the GUI.

If possible i, wanna make the text line one below another, u know , like my post in here.

thx

If you really want an answer here, an example of your GUI would help :D

[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

MsgBox( 64, "", "Line1" & @crlf & "Line2" & @crlf & "Line3")

:D


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hy, i have a GUI and a text that is too long, i mean is getting out, and i wanna know how to wrap it ?

i saw something with @CR but its not working, imean the "@CR" is shown in the text on the GUI.

If possible i, wanna make the text line one below another, u know , like my post in here.

thx

So your GUI is reading with a "@CR" in it, format line break like this

Replace with @CRLF

BlaBla("1st text" & @CRLF & "2nd Text", "More text")

otherwise it thins the @CR is part of the string to display

Edited by Paulie

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

you probably have the @CR in the quotes. Try this.

guictrlcreatelabel(0, 0, "whatever text you need" & @CR & "then the text that should appear on the next line")

hope this helps. Just remember the "&" sign on both sides of the @CR and to make sure that the "& @CR &" is not in any quotes.

EDIT: looks like 2 other people beat me to it.

Edited by Infinitex0

The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

thx a lot

arhhh, i have now another problem:

the text is shown but not all, is shown only aprox 10% horrizontally, not vertically ( the @CR stuff) and another question. I have a button that starts a batch script, but i want it hidden, not minimized. heres the script:

; The Gui

GUICreate ( "XP pt jocuri by roberto", 400, 500 )

GUISetState (@SW_SHOW)

GUICtrlCreateLabel ("Acest programel pregateste comp-ul pt rularea unui joc" & @CR & "care necesita resurse mari, si anume oprind serviciile si procesele" & @CR & "innecesare rularii" & @CRLF & "windows-ului.", 40, 30 )

GUICtrlCreateLabel ('--Pentru a incepe click pe "Start" !', 40, 190 )

GUICtrlCreateLabel ('--Pentru a iesi, click pe "Exit"', 40, 250 )

GUISetIcon ( "data\icon.ico" )

; The buttons

$exit = GUICtrlCreateButton ( "Exit", 270, 350, 100, 95)

GUICtrlSetOnEvent ( $exit, "exitpressed" )

GUISetOnEvent($GUI_EVENT_CLOSE, "exitpressed")

GUICtrlSetTip($exit,"Click pentru a iesi")

$start = GUICtrlCreateButton ( "Start", 30, 350, 100)

GUICtrlSetOnEvent ( $start, "startpressed" )

GUICtrlSetTip($start,"Click pentru a incepe pregatirea")

$despre = GUICtrlCreateButton ( "Despre", 330, 10, 50)

GUICtrlSetOnEvent ( $despre, "desprepressed" )

GUICtrlSetTip($despre,"Click pentru a vedea info despre program si autor")

While 1

sleep(1000);idle

WEnd

func exitpressed()

exit

endfunc

$splashtext = "Procesul de pregatire este in curs"

func startpressed()

SplashTextOn ( "XP pt jocuri", "Asteapta !!!" & @CR & "Procesul de pregatire este in curs", 300, 150, -1, -1, 2, "Comic Sans MS Bold", "14" )

$PID = RunWait(@ComSpec & " /c " & 'start /w /min data\run.bat', "", @SW_HIDE)

WinWaitActive("")

ProcessWaitClose($PID)

SplashOff ( )

Endfunc

func desprepressed()

SplashTextOn ( "XP-tools kit v1.0", "Xp pt jocuri creat de Roberto" & @CR & "V 1.0", 300, 100, -1, -1, 0, "Comic Sans MS Bold", "14" )

sleep(5000)

SplashOff ( )

endfunc

Edited by doohoodogg

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Give the label a width and height

GUICtrlCreateLabel ("Acest programel pregateste comp-ul pt rularea unui joc" & @CR & "care necesita resurse mari, si anume oprind serviciile si procesele" & @CR & "innecesare rularii" & @CRLF & "windows-ului.", 40, 30, 330, 70 )

#include <GUIConstants.au3>
Opt ("guiOnEventMode",1)
GUICreate ( "XP pt jocuri by roberto", 400, 500 )
GUISetState (@SW_SHOW)
GUICtrlCreateLabel ("Acest programel pregateste comp-ul pt rularea unui joc" & @CR & "care necesita resurse mari, si anume oprind serviciile si procesele" & @CR & "innecesare rularii" & @CRLF & "windows-ului.", 40, 30, 330,70 )
GUICtrlCreateLabel ('--Pentru a incepe click pe "Start" !', 40, 190 )
GUICtrlCreateLabel ('--Pentru a iesi, click pe "Exit"', 40, 250 )
GUISetIcon ( "data\icon.ico" )

; The buttons
$exit = GUICtrlCreateButton ( "Exit", 270, 350, 100, 95)
GUICtrlSetOnEvent ( $exit, "exitpressed" )
GUISetOnEvent($GUI_EVENT_CLOSE, "exitpressed")
GUICtrlSetTip($exit,"Click pentru a iesi")

$start = GUICtrlCreateButton ( "Start", 30, 350, 100)
GUICtrlSetOnEvent ( $start, "startpressed" )
GUICtrlSetTip($start,"Click pentru a incepe pregatirea")

$despre = GUICtrlCreateButton ( "Despre", 330, 10, 50)
GUICtrlSetOnEvent ( $despre, "desprepressed" )
GUICtrlSetTip($despre,"Click pentru a vedea info despre program si autor")

While 1
sleep(1000);idle
WEnd

func exitpressed()
exit
endfunc

$splashtext = "Procesul de pregatire este in curs"

func startpressed()
SplashTextOn ( "XP pt jocuri", "Asteapta !!!" & @CR & "Procesul de pregatire este in curs", 300, 150, -1, -1, 2, "Comic Sans MS Bold", "14" )
$PID = RunWait(@ComSpec & " /c " & 'start /w /min data\run.bat', "", @SW_HIDE)
WinWaitActive("")
ProcessWaitClose($PID)
SplashOff ( )
Endfunc
Edited by ChrisL

Share this post


Link to post
Share on other sites

Right, thx and the hide problem

$PID = RunWait(@ComSpec & " /c " & 'start /w /min data\run.bat', "", @SW_HIDE)

it seems that the @SW_Hide doesnt work

Share this post


Link to post
Share on other sites

that runs a script that terminates some processes, but its shows a cmd window minimized, and i dont want that, i want it hidden.

Share this post


Link to post
Share on other sites

that runs a script that terminates some processes, but its shows a cmd window minimized, and i dont want that, i want it hidden.

What I posted above launches a hidden command window, I just tried the exact code.

If you are getting another window up it is something else that your (not)doing

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