Jump to content

GUI won't SEND


 Share

Recommended Posts

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...... :D

; 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

; 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

endif

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 :D

Edited by jpm
Link to comment
Share on other sites

Needs work ?

---------------------------

AutoIt Error

---------------------------

Line 13  (File "E:\Programs\AutoIt3\Examples\june10\1.au3"):

msgbox (0,""$input); will display the typed value

msgbox (0,^ ERROR

Error: Error in expression.

Link to comment
Share on other sites

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 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

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 :huh2:

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 :D

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...