doohoodogg Posted June 10, 2006 Posted June 10, 2006 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
Moderators SmOke_N Posted June 10, 2006 Moderators Posted June 10, 2006 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.thxIf you really want an answer here, an example of your GUI would help 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.
Daniel W. Posted June 10, 2006 Posted June 10, 2006 MsgBox( 64, "", "Line1" & @crlf & "Line2" & @crlf & "Line3") --------------------------------------------------------------------------------------------------------------------------------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]
Paulie Posted June 10, 2006 Posted June 10, 2006 (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. thxSo 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 June 10, 2006 by Paulie
Infinitex0 Posted June 10, 2006 Posted June 10, 2006 (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 June 10, 2006 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]
doohoodogg Posted June 10, 2006 Author Posted June 10, 2006 (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 June 10, 2006 by doohoodogg
ChrisL Posted June 10, 2006 Posted June 10, 2006 (edited) Give the label a width and heightGUICtrlCreateLabel ("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 )expandcollapse popup#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 June 10, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
doohoodogg Posted June 11, 2006 Author Posted June 11, 2006 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
ChrisL Posted June 11, 2006 Posted June 11, 2006 I don't see why you need to use start what does this do? $PID = RunWait(@ComSpec & " /c " & " data\run.bat", "", @SW_HIDE) [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
doohoodogg Posted June 16, 2006 Author Posted June 16, 2006 that runs a script that terminates some processes, but its shows a cmd window minimized, and i dont want that, i want it hidden.
ChrisL Posted June 16, 2006 Posted June 16, 2006 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 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now