Hello,
I was wondering if I can get some assistance with this script. I put the $input1 in the StringReplace to give a better understanding on what I am trying to accomplish. Long story short, I am trying to have input box 1 be free text and any space that is input will be replaced with a "-" (minus).
Thanks you all!
#include <MsgBoxConstants.au3>
; Replace a blank space (' ') with a - (minus) character.
Local $sString = StringReplace("$input1", " ", "-")
Local $iReplacements = @extended
$parentgui=GUICreate("Convert", 600, 620)
$input1= GUICtrlCreateInput ("",10,10,200,200)
$input2= GUICtrlCreateInput ("",300,10,200,200)
$convert= GUICtrlCreatebutton ("Convert",220,100,50,50)
GUISetState(@SW_SHOW)
While 1
$iMsg = GUIGetMsg()
GUISetState(@SW_SHOW)
Select
Case $iMsg = $convert
ControlSetText ("Convert","","[CLASS:Edit; INSTANCE:2]", $sString)
;($MB_SYSTEMMODAL, "", $iReplacements & " replacements were made and the new string is:" & @CRLF & @CRLF & $sString)
Endselect
WEND