aaronlyy Posted August 31, 2018 Share Posted August 31, 2018 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 More sharing options...
AutoBert Posted August 31, 2018 Share Posted August 31, 2018 you must align the returned string to your var: $encText = StringReplace("$encText", " ", "#") aaronlyy 1 Link to comment Share on other sites More sharing options...
ajag Posted August 31, 2018 Share Posted August 31, 2018 $encText = StringReplace($encText, " ", "#") aaronlyy 1 Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
aaronlyy Posted August 31, 2018 Author Share Posted August 31, 2018 12 minutes ago, AutoBert said: you must align the returned string to your var: $encText = StringReplace("$encText", " ", "#") 11 minutes ago, ajag said: $encText = StringReplace($encText, " ", "#") thank you very much <3 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