Sign in to follow this  
Followers 0
jordanchin

I need help with...

4 posts in this topic

I want to make this:

Type your name in, press a button and a message box pops up saying: Welcome Your name.

can anyone help? don't do it for me but explain how please.

Share this post


Link to post
Share on other sites

I suggest that you look at the AutoIt 1-2-3 tutorial in the Example Scripts forum. You are going to need a starting tutorial to do something like this. But if you want, it's a very simple script, and I could write it for you and show it how I did it.


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

as long as you show me how you did it i would be glad to accept your offer thanks man.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Here you go:

#include <GUIConstants.au3>

$window = GUICreate("window", 253, 44, -1, -1)
$input = GUICtrlCreateInput("Your Name Here", 10, 10, 121, 21)
$ok = GUICtrlCreateButton("ok", 150, 10, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $ok
            MsgBox(0, "Welcome", "Welcome " & GUICtrlRead($input))
    EndSwitch
WEnd

All this does:

1. Create a window.

2. Continually check if you pressed the OK button. If you did, it goes to step 3. If not, it continues checking.

3. A message box is created, and it merges the data read from the input box with the word "Welcome". Try running it yourself!

Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

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