run ("C:\Program Files\FARA PLC\WinFPST 2\WinFPST.exe") winwaitactive('WinFPST','U p l o a d f r o m P L C') ControlClick ('WinFPST','U p l o a d f r o m P L C', '[CLASS:Button; INSTANCE:3]') winwaitactive('WinFPST','PLC is disabled to write/read') ControlClick ('WinFPST','PLC is disabled to write/read', '[CLASS:Button; INSTANCE:1]') winwaitactive('Set PLC Password - Untitle1') send('{tab}') clipput('') $a=0 $b=65535 for $i=$a to $b; от 0 до 65535 $pas = hex($i,4) clipput($pas) send('^v') $c=clipget() send('{enter}') sleep(500) if winactive ('WinFPST','Entered password is incorrect') then send('{enter}') elseif not winactive ('WinFPST','Entered password is incorrect') then sleep(500) if winactive ('WinFPST','Entered password is incorrect') then send('{enter}') elseif not winactive ('WinFPST','Entered password is incorrect') then sleep(500) if winactive ('WinFPST','Entered password is incorrect') then send('{enter}') elseif not winactive ('WinFPST','Entered password is incorrect') Then sleep(2500) if winactive ('WinFPST','Entered password is incorrect') then send('{enter}') elseif not winactive ('WinFPST','Entered password is incorrect') Then sleep(2500) if winactive ('WinFPST','PLC became enabled to write/read') then MsgBox(0,"пароль определен",$c) exit elseif not winactive ('WinFPST','PLC became enabled to write/read') then msgbox(16,'ошибка!! подбор остановился на',$c) exit endif endif EndIf EndIf EndIf next MsgBox(48, "","пароль не определен. попробуй еще!")