#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=oem2.ico #AutoIt3Wrapper_Outfile=AWC AutoIt Stringer.Exe #AutoIt3Wrapper_Res_CompanyName=AWC Sytems #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include $soft = "AWC AutoIt String Converter" $ver = 0.5 $g = GUICreate($soft & " " & $ver, 320, 240) $file = GUICtrlCreateMenu("File") $open = GUICtrlCreateMenuItem("Open", $file) $ed = GUICtrlCreateEdit("", 10, 10, 127, 140) $l = GUICtrlCreateEdit("str", 150, 10, 150, 200, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL, $ES_READONLY)) $but = GUICtrlCreateButton("Convert", 10, 160, 60, 50) $clip = GUICtrlCreateButton("2Clipboard", 80, 160, 60, 50) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $but $s = powerconverter(GUICtrlRead($ed)) GUICtrlSetData($l, $s[0]) Case $clip ClipPut(GUICtrlRead($l)) Case $open $filex = FileOpenDialog("Select file to convert", "", "Text files(*.html;*.txt;*.htm;*.rtf)", 0) $re = FileRead($filex) GUICtrlSetData($ed, $re) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func powerconverter($str) $str = StringStripWS($str, 4) $out = StringSplit($str, @CRLF) Local $o[2] = ["", ""] For $i = 1 To $out[0] If $i <> $out[0] Then $o[0] &= '"' & $out[$i] & '" & @CRLF & ' $o[1] &= '"' & $out[$i] & '" && @CRLF && ' Else $o[0] &= '"' & $out[$i] & '"' $o[1] &= '"' & $out[$i] & '"' EndIf Next Return $o EndFunc