Jump to content

Text box help


Recommended Posts

#include <GUIConstants.au3>

GUICreate(".") ; will create a dialog box that when displayed is centered

GUICtrlCreateLabel (".", 10,20)

GUICtrlCreateLabel (".", 10,40)

GUICtrlCreateLabel (".", 10,60)

GUICtrlCreateLabel (".", 10,80)

GUICtrlCreateLabel (".", 10,100)

GUICtrlCreateLabel (".", 10,120)

GUICtrlCreateLabel (".", 10,140)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

______________________________________________________

Every "." is text

I want that there is in this window a button: Ok

If u click on ok he must be go on with the script

Link to comment
Share on other sites

See my answer to this Topic

Edit-

Remember to scroll down as I have not figured out how to link directly to the answer.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

See my answer to this Topic

Edit-

Remember to scroll down as I have not figured out how to link directly to the answer.

$Button_1 = GuiCtrlCreateButton("OK", 340, 20, 50, 30)

$Label_2 = GuiCtrlCreateLabel("", 20, 20, 300, 40)

GUICtrlSetFont($Label_2, 24)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_1

ExitLoop

EndSelect

WEnd

Ihave that copied..... But when i click on OK The message stays and the script begins, I want that the message closed and then the script start

Link to comment
Share on other sites

$Button_1 = GuiCtrlCreateButton("OK", 340, 20, 50, 30)

$Label_2 = GuiCtrlCreateLabel("", 20, 20, 300, 40)

GUICtrlSetFont($Label_2, 24)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $Button_1

ExitLoop

EndSelect

WEnd

Ihave that copied..... But when i click on OK The message stays and the script begins, I want that the message closed and then the script start

Try this

#include <GUIConstants.au3>

GUICreate("."); will create a dialog box that when displayed is centered


GUICtrlCreateLabel (".", 10,20)
GUICtrlCreateLabel (".", 10,40)
GUICtrlCreateLabel (".", 10,60)
GUICtrlCreateLabel (".", 10,80)
GUICtrlCreateLabel (".", 10,100)
GUICtrlCreateLabel (".", 10,120)
GUICtrlCreateLabel (".", 10,140) 
$Button_1 = GuiCtrlCreateButton("OK", 340, 20, 50, 30)
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_1
        ExitLoop
    EndSelect
WEnd


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Try this

#include <GUIConstants.au3>

GUICreate("."); will create a dialog box that when displayed is centered
GUICtrlCreateLabel (".", 10,20)
GUICtrlCreateLabel (".", 10,40)
GUICtrlCreateLabel (".", 10,60)
GUICtrlCreateLabel (".", 10,80)
GUICtrlCreateLabel (".", 10,100)
GUICtrlCreateLabel (".", 10,120)
GUICtrlCreateLabel (".", 10,140) 
$Button_1 = GuiCtrlCreateButton("OK", 340, 20, 50, 30)
GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_1
        ExitLoop
    EndSelect
WEnd
Nice but when i click on the X/ok button he don't close the window....

He start the script but he dont close the window

Link to comment
Share on other sites

Nice but when i click on the X/ok button he don't close the window....

He start the script but he dont close the window

Could you post the rest of your script please. When I run just the part I posted the window closes ok.

Edit-

Try adding GUIDelete() after the code that I suggested

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

WAY TO GO! Those structures in your code are great!

.

.

.

not B)

I am sorry that my code does not meet with your approval. :o:graduated::)


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...