BulletMonk Posted October 18, 2005 Share Posted October 18, 2005 Sorry for posting in the wrong forum before. How do I make a field for people to type a word in? And what is the script to make that word appear in my nect msgbox? Link to comment Share on other sites More sharing options...
LxP Posted October 18, 2005 Share Posted October 18, 2005 (edited) Local $MyVariable = InputBox('Question', 'What is your name?') MsgBox(64, 'Message', 'Your name is ' & $MyVariable & '.')Edit: The InputBox() has a Cancel button and you might want to (e.g.) exit your script if the user clicks it. Here's how:Local $MyVariable = InputBox('Question', 'What is your name?') If @Error Then Exit MsgBox(64, 'Message', 'Your name is ' & $MyVariable & '.') Edited October 18, 2005 by LxP Link to comment Share on other sites More sharing options...
BulletMonk Posted October 18, 2005 Author Share Posted October 18, 2005 Thanks once again. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted October 18, 2005 Share Posted October 18, 2005 if you want to do it using a gui try this 1: #include<guiconstants.au3>; include this to make a gui $main = guicreate ("Main window", 200, 100); create the main window of the gui $input = guictrlcreateinput ("", 10, 10, 180); here is your inputfield $button = guictrlcreatebutton ("Action", 10, 40, 180); the button for an interaction guisetstate(); to let someone see the gui while 1; for infinte loop $msg = guigetmsg(); to find out if the something happens in the gui, e.g. button pressed select; mutiple options case $msg = $GUI_EVENT_CLOSE; to detect if someone hits the X to close the window exit; then exit the script case $msg = $button; someone pushed the button msgbox (0, "Message", "You typed " & guictrlread($input)); messagebox - title:Message - text: You typed & whatever is in the input endselect; for ending the select wend; for ending the whileloop the script can only be exited with the X-button longer version as LxP did but i like that 1 more ok it's not that easy good luck with your script btw what do you need that for? my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
BulletMonk Posted October 18, 2005 Author Share Posted October 18, 2005 Nothing really.I'm just trying out all sorts of simple scripts..can't say the one you posted is simple =)). Link to comment Share on other sites More sharing options...
Nuffilein805 Posted October 18, 2005 Share Posted October 18, 2005 well, ok maybe its a bit too much for a beginner, but it's a good example for a gui i think you're gonna have lots of fun using autoit my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
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