Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.8.1
- Author: myName
- Script Function:
- Template AutoIt script.
- #ce ----------------------------------------------------------------------------
- ; Script Start - Add your code below here
- #include <ButtonConstants.au3>
- #include <ListViewConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <Array.au3>
- #Region ### START Koda GUI section ### Form=C:\Users\GenoTIPok\Documents\AllScripts\NameGenerate\Form1.kxf
- $Form1 = GUICreate("WordGenerated by 4ppleboy", 482, 433, 406, 153)
- $Group1 = GUICtrlCreateGroup("Англоязычный поиск слов", 8, 0, 257, 97)
- $Input1 = GUICtrlCreateInput("гсссг", 16, 16, 209, 21)
- $Button1 = GUICtrlCreateButton("Go", 230, 15, 29, 22)
- $Label1 = GUICtrlCreateLabel("Г-гласная", 16, 40, 54, 17)
- $Label2 = GUICtrlCreateLabel("С-согласная", 16, 56, 67, 17)
- $Label3 = GUICtrlCreateLabel("Х-любой символ", 16, 72, 87, 17)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- ;~ $Edit1 = GUICtrlCreateEdit("", 272, 8, 201, 417)
- ;~ GUICtrlSetData(-1, "Подобранные слова")
- $ListView1 = GUICtrlCreateListView("Подобранные слова", 272, 8, 201, 417)
- GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 197)
- $Group2 = GUICtrlCreateGroup("Добавить слово к подобранному", 8, 104, 225, 73)
- $Radio1 = GUICtrlCreateRadio("Впереди", 16, 120, 65, 17)
- $Radio2 = GUICtrlCreateRadio("Позади", 88, 120, 57, 17)
- $Input2 = GUICtrlCreateInput("", 16, 144, 209, 21)
- GUICtrlCreateGroup("", -99, -99, 1, 1)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- Dim $Glasnie[6]=["a","e","i","o","u","y"]
- Dim $Soglasnie[20]=["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z"]
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- Dim $chars_array[1]
- Dim $template_array[1]
- Dim $chars_convert_to_template_array[1]
- ;~ $ListView1_0 = GUICtrlCreateListViewItem("пуск", $ListView1)
- $template = GUICtrlRead($Input1)
- $len_template = StringLen($template)
- For $iTrimTemplate = 1 To $len_template
- ReDim $template_array[$iTrimTemplate+1]
- $simbol_template = StringTrimRight($template,$len_template - $iTrimTemplate)
- $simbol_template = StringTrimLeft($simbol_template, $iTrimTemplate-1)
- $template_array[$iTrimTemplate] = $simbol_template
- Next
- ;~ _ArrayDisplay($template_array)
- $fileWrite = FileOpen("text.txt", 0)
- If $fileWrite = -1 Then Exit
- While 1
- $chars = FileReadLine($fileWrite) ;Слово
- If @error = -1 Then
- ExitLoop
- MsgBox(0,'','Слова кончились')
- EndIf
- If StringLen($chars)==$len_template Then
- For $iTrim=0 To $len_template-1
- ReDim $chars_array[$iTrim+1]
- ReDim $chars_convert_to_template_array[$iTrim+1]
- $simbol = StringTrimRight($chars,$len_template-$iTrim-1)
- $simbol = StringTrimLeft($simbol, $iTrim)
- $chars_array[$iTrim] = $simbol
- For $iSearchG = 0 To 5
- If StringLower($chars_array[$iTrim]) == $Glasnie[$iSearchG] Then
- $chars_convert_to_template_array[$iTrim] = "г"
- Else
- $chars_convert_to_template_array[$iTrim] = "c"
- EndIf
- Next
- Next
- EndIf
- $ListView1_0 = GUICtrlCreateListViewItem(_ArrayToString($chars_convert_to_template_array,""), $ListView1)
- _ArrayDisplay($chars_array)
- Wend
- FileClose($fileWrite)
- EndSwitch
- WEnd
Add Comment
Please, Sign In to add comment