Jump to content
Sign in to follow this  
Lisuter

Problem with func - output 0?

Recommended Posts

Lisuter

Hello.

I have problem with my work...

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, 192, 124)
Global $Input1 = GUICtrlCreateInput("", 8, 8, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 280, 32, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 8, 88, 345, 145)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Button1
            editb()


    EndSwitch
WEnd

Func blanktoplus($aa)
 StringReplace(GuiCtrlRead($aa), " ", "+")
 Global $iReplacements = @extended
EndFunc

Func editb()
    Global $Edit1 = GUICtrlSetData(-1,"The full name is:" & blanktoplus($Input1))

EndFunc

 

On my form i have: 1x Input, 1x Button, 1x Edit

In input1 i have: Sara Oconnor.

I want after click button to set message in edit1 like this:

The full name is: Sara+Oconnor

Now i have: The full name is: 0

 

Where is the problem? Thanks!

Share this post


Link to post
Share on other sites
Lisuter

Thanks bro! ;)

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  

×