DaLiMan Posted June 10, 2004 Share Posted June 10, 2004 Hi there, I am new to v3 GUI writing so I thought "Start Simple" and go from there. But the first example from the help file ( with a small change ) still doesn't work. Can anyone help me back on the track? I want to enter some text in the box and then write this in my app. But the code below won't work...... ; a basic GUI equivalent to $input= InputBox ("My first AutoIt GUI", "Please Enter ?") GuiCreate ("My first AutoIt GUI") ; start the definition GuiSetControl ("label", "Please Enter ?", 10,10); add prompt info $nInput = GuiSetControl ("input", "", 10,30) ; add the input area $nOk = GUISetControl ("button", "OK", 20,70); add the button that will close the GUI GuiWaitClose (); to display the dialog box if $nOK= GuiRead () then; to verify if OK was click Global $input = GuiRead ($nInput); get the type value Send, ($input); will display the typed value endif Link to comment Share on other sites More sharing options...
jpm Posted June 10, 2004 Share Posted June 10, 2004 (edited) ; a basic GUI equivalent to $input= InputBox ("My first AutoIt GUI", "Please Enter ?")GuiCreate ("My first AutoIt GUI") ; start the definition GuiSetControl ("label", "Please Enter ?", 10,10); add prompt info $nInput = GuiSetControl ("input", "", 10,30) ; add the input area $nOk = GUISetControl ("button", "OK", 20,70); add the button that will close the GUI GuiWaitClose (); to display the dialog box if $nOK= GuiRead () then; to verify if OK was click Global $input = GuiRead ($nInput); get the type value msgbox (0,""$input); will display the typed value endifjust use a function to display as msgbox, Send is sending info to a windows.In your case you have not open a windows to send the info to.I hope that help Edited June 10, 2004 by jpm Link to comment Share on other sites More sharing options...
bobheart Posted June 10, 2004 Share Posted June 10, 2004 Needs work ?---------------------------AutoIt Error---------------------------Line 13 (File "E:\Programs\AutoIt3\Examples\june10\1.au3"):msgbox (0,""$input); will display the typed valuemsgbox (0,^ ERRORError: Error in expression. Link to comment Share on other sites More sharing options...
CyberSlug Posted June 10, 2004 Share Posted June 10, 2004 msgbox (0,"", $input); will display the typed value Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
pekster Posted June 10, 2004 Share Posted June 10, 2004 (edited) Simple change, it just needs a comma to seperate the paramaters. MsgBox(0, "", $input) [Edit]: Started posting before CS's post. Didn't mean to dupicate post. Edited June 10, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
DaLiMan Posted June 11, 2004 Author Share Posted June 11, 2004 just use a function to display as msgbox, Send is sending info to a windows. In your case you have not open a windows to send the info to. I hope that help Sorry for the wrong info, but I just copied the item from the HELP file and only changed the script line but not the extra text behind it. But it should say: if $nOK= GuiRead () then; to verify if OK was click Global $input = GuiRead ($nInput); get the type value Send, ($input); will send the typed value endif Anyway......yesterday evening I figured out what was wrong. I mixed v2 and v3 code like this -> Send, ($Input) Notice the " , " in the code !!!! :iamstupid: Just had to remove this and works fine. Thanx all together 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