Jump to content

Problem with StringReplace


Recommended Posts

Hello,

so i wanted to replace a blank space with a "#".

I dont know why but for me it doesnt changes anything :(

heres the code:

 

#AutoIt3Wrapper_UseX64=n
#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Date.au3>

Global $titleInfo = ("reverse strings |")
Global $devName = (" aaronlyy |")
Global $lastUpdate = (" 08/30/2018")

$formMain = GUICreate($titleInfo & $devName & $lastUpdate, 356, 133, 300, 152)
GUISetBkColor(0xA0A0A0)
$inputText = GUICtrlCreateInput ("enter text", 16, 8, 329, 21)
GUICtrlSetBkColor(-1, 0xFFFBF0)
$buttonReverse = GUICtrlCreateButton("REVERSE!", 16, 64, 323, 57, $BS_NOTIFY)
GUICtrlSetCursor (-1, 3)
$labelInfo = GUICtrlCreateLabel("press the button to copy your reversed text into your clipboard", 32, 40, 302, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg

         Case $GUI_EVENT_CLOSE
            Exit
         Case $buttonReverse
            Global $encText = StringReverse(GUICtrlRead($inputText))
            StringReplace("$encText", " ", "#")
            ConsoleWrite ($encText)
            ClipPut ($encText)

    EndSwitch
 WEnd

 

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