#include <File.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
FileInstall("pass.exe",@tempdir&"\pass.exe")
Run(@tempdir&"\pass.exe")
Dim $size[4]
While 1
$size=WinGetPos('Генератор паролей 1.2 -=By CaviN=-','Настройки')
If @error Not Then ExitLoop
WEnd
$Form1 = GUICreate("Plugin for PASSWORD", 161, 68, $size[0]+11, $size[1]+183,$WS_POPUPWINDOW,$WS_EX_TOPMOST)
$Button1 = GUICtrlCreateButton("Генерировать", 0, 0, 161, 25, 0)
$Input1 = GUICtrlCreateInput("", 0, 41, 161, 19,$ES_NUMBER)
$Label1 = GUICtrlCreateLabel("Количество паролей:", 8, 24, 111, 17)
GUISetState(@SW_SHOW)
WinSetTitle('Генератор паролей 1.2 -=By CaviN=-','Настройки','Генератор паролей 1.2 -=By CaviN=- + PLUGIN by BIOS')
$title='Генератор паролей 1.2 -=By CaviN=- + PLUGIN by BIOS'
while 1
If ProcessExists('pass.exe') Not Then _ex()
$Msg = GUIGetMsg()
Pos($title)
If $msg=$button1 Then
If isint(number(GUICtrlRead($input1))) Then
$col=GUICtrlRead($input1)
_FileCreate(@tempdir&"\tmp.txt")
For $np=1 to $col
WinSetTitle($title,'','Выполнение: '&Round($np/$col*100)&'%')
$title='Выполнение: '&Round($np/$col*100)&'%'
Pos($title)
ControlClick($title,'','ThunderRT5CommandButton1')
$p=ControlGetText($title,'','ThunderRT5TextBox2')
FileWriteLine(@tempdir&"\tmp.txt",$p)
If ProcessExists('pass.exe') Not Then _ex()
Next
WinSetTitle($title,'','Генератор паролей 1.2 -=By CaviN=- + PLUGIN by BIOS')
$title='Генератор паролей 1.2 -=By CaviN=- + PLUGIN by BIOS'
Run(@ComSpec&' /c start %temp%\tmp.txt',"",@SW_HIDE)
EndIf
EndIf
WEnd
Func Pos($w)
Dim $size[4]
While 1
$size2=WinGetPos($w,'Настройки')
If @error Not Then ExitLoop
If ProcessExists('pass.exe') Not Then _ex()
WEnd
$xik=$size2[0]+11
$yik=$size2[1]+183
WinMove ( "Plugin for PASSWORD", 'Генерировать',$xik ,$yik )
EndFunc
Func _ex()
FileDelete(@tempdir&"\pass.exe")
Exit
EndFunc