#include <GuiComboBoxEx.au3> 
#include <WindowsConstants.au3> 
#include <GuiConstantsEx.au3> 
#include <StaticConstants.au3> 
#include <GuiEdit.au3> 
  
global $btn1, $inp1, $inp2, $inp3, $btn2, $btn3, $inp4, $inp5, $btn4, $btn5, $lab, $start, $box 
  
hotkeyset("+!^e", "Example1") 
hotkeyset("+!^у", "Example3") 
  
$start = "false" 
  
$FileName=@ScriptDir & "\akks.xlsx" 
  
$oExcelDoc = ObjGet($FileName) ; Get an Excel Object from an existing filename 
$oDocument=$oExcelDoc.Worksheets(1) ; We use the 'Default' worksheet 
  
Example2() 
  
Func Example2() 
Local $a, $r[100], $pass, $gui, $index, $iImage, $new_akk, $sText, $b[100], $index2 
  
$pass = "nothing" 
$new_akk = "nothing" 
$a = $oDocument.cells(10100, 100).value 
  
$gui = guicreate("", 405, 175) 
$btn1 = guictrlcreatebutton("новый акк", 5, 5, 95, 20) 
$inp1 = guictrlcreateedit("", 205, 5, 195, 20, $ES_AUTOHSCROLL) 
_GUICtrlEdit_SetReadOnly($inp1, true) 
$inp2 = guictrlcreateedit("", 5, 30, 195, 20, $ES_AUTOHSCROLL) 
_GUICtrlEdit_SetReadOnly($inp2, true) 
$inp3 = guictrlcreateedit("", 205, 30, 195, 20, $ES_AUTOHSCROLL)  
_GUICtrlEdit_SetReadOnly($inp3, true) 
$btn2 = guictrlcreatebutton("Изменить", 205, 55, 90, 20) 
$btn3 = guictrlcreatebutton("Подтвердить из.", 305, 55, 95, 20) 
$btn5 = guictrlcreatebutton("Сохранить изменения", 5, 105, 195, 20) 
$btn6 = guictrlcreatebutton("ПУСК", 205, 105, 195, 20) 
$btn4 = guictrlcreatebutton("сохранить", 105, 5, 95, 20) 
$inp4 = guictrlcreateedit("", 5, 80, 195, 20, $ES_AUTOHSCROLL) 
_GUICtrlEdit_SetReadOnly($inp4, true) 
$inp5 = guictrlcreateedit("", 205, 80, 195, 20, $ES_AUTOHSCROLL)  
_GUICtrlEdit_SetReadOnly($inp5, true) 
$box = _GUICtrlComboBoxEx_Create($gui, "", 5, 55, 195, 80) 
$lab = guictrlcreatelabel("А теперь переключитесь на линейку, ткните на поле ввода логина, и нажмите комбинацию CTRL+SHIFT+ALT+Е на англ. языке или CTRL+SHIFT+ALT+У на русском", 5, 180, 390, 40) 
  
guisetstate() 
  
_GUICtrlComboBoxEx_BeginUpdate ($box) 
for $index = 1 to Ubound($r) - 100 + $a 
$r[$index] = _GUICtrlComboBoxEx_AddString ($box, $oDocument.cells(10000 + $index, 101).value) 
Next 
_GUICtrlComboBoxEx_EndUpdate ($box) 
_GUICtrlComboBoxEx_SetCurSel ($box, 0) 
while 1 
Switch GUIGetMsg() 
Case $GUI_EVENT_CLOSE 
ExitLoop 
case $btn1 
if $new_akk = "create" then  
_GUICtrlEdit_SetReadOnly($inp1, true) 
guictrlsetdata($inp1, "") 
_GUICtrlEdit_SetReadOnly($inp2, true) 
guictrlsetdata($inp2, "") 
_GUICtrlEdit_SetReadOnly($inp3, true) 
guictrlsetdata($inp3, "") 
$new_akk = "wait" 
guictrlsetdata($btn1, "новый акк") 
EndIf 
if $new_akk = "nothing" then  
_GUICtrlEdit_SetReadOnly($inp1, False) 
guictrlsetdata($inp1, "введите название аккаунта") 
_GUICtrlEdit_SetReadOnly($inp2, False) 
guictrlsetdata($inp2, "введите логин") 
_GUICtrlEdit_SetReadOnly($inp3, False) 
guictrlsetdata($inp3, "введите пароль") 
$new_akk = "create" 
guictrlsetdata($btn1, "отмена") 
EndIf 
if $new_akk = "wait" then  
$new_akk = "nothing" 
EndIf 
case $btn4 
$oDocument.cells(10001 + $a, 101).value = guictrlread($inp1) 
$oDocument.cells(10001 + $a, 102).value = guictrlread($inp2) 
$oDocument.cells(10001 + $a, 103).value = guictrlread($inp3) 
_GUICtrlComboBoxEx_BeginUpdate ($box) 
_GUICtrlComboBoxEx_AddString ($box, guictrlread($inp1)) 
_GUICtrlComboBoxEx_EndUpdate ($box) 
_GUICtrlEdit_SetReadOnly($inp1, true) 
guictrlsetdata($inp1, "") 
_GUICtrlEdit_SetReadOnly($inp2, true) 
guictrlsetdata($inp2, "") 
_GUICtrlEdit_SetReadOnly($inp3, true) 
guictrlsetdata($inp3, "") 
$oExcelDoc.Save 
case $btn2 
if $pass = "firststep" Then 
_GUICtrlEdit_SetReadOnly($inp4, true) 
guictrlsetdata($inp4, "") 
_GUICtrlEdit_SetReadOnly($inp5, true) 
guictrlsetdata($inp5, "") 
$pass = "wait" 
EndIf 
if $pass = "secondstep" Then 
_GUICtrlEdit_SetReadOnly($inp4, true) 
guictrlsetdata($inp4, "") 
_GUICtrlEdit_SetReadOnly($inp5, true) 
guictrlsetdata($inp5, "") 
$pass = "wait" 
EndIf 
if $pass = "nothing" Then 
_GUICtrlEdit_SetReadOnly($inp4, False) 
guictrlsetdata($inp4, "введите действующий логин") 
_GUICtrlEdit_SetReadOnly($inp5, False) 
guictrlsetdata($inp5, "введите действующий пароль") 
$pass = "firststep" 
guictrlsetdata($btn2, "отмена") 
EndIf 
if $pass = "wait" Then 
guictrlsetdata($btn2, "Изменить") 
$pass = "nothing" 
EndIf 
case $btn3 
if $pass = "firststep" then 
if guictrlread($inp4) = $oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 102).value then 
if guictrlread($inp5) = $oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 103).value then 
guictrlsetdata($inp4, "введите новый логин") 
guictrlsetdata($inp5, "введите новый пароль") 
$pass = "secondstep" 
Else 
msgbox(4096, "Ошибка", "неправильно ввели пароль") 
EndIf 
Else 
msgbox(4096, "Ошибка", "неправильно ввели логин") 
EndIf 
EndIf 
case $btn5 
$oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 102).value = guictrlread($inp4)  
$oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 103).value = guictrlread($inp5) 
_GUICtrlEdit_SetReadOnly($inp4, true) 
guictrlsetdata($inp4, "") 
_GUICtrlEdit_SetReadOnly($inp5, true) 
guictrlsetdata($inp5, "") 
$oExcelDoc.Save 
case $btn6 
guictrlsetpos($lab, 5, 130) 
$start = "true" 
EndSwitch 
WEnd 
EndFunc ;==>Example2 
  
$oExcelDoc = 0 
  
Func Example1() 
if $start = "true" then 
send($oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 102).value) 
sleep(250) 
send("{tab}") 
sleep(250) 
send($oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 103).value) 
sleep(250) 
send("{enter}") 
$start = "false" 
guictrlsetpos($lab, 5, 180) 
endif 
EndFunc ;==>WM_VSCROLL 
  
Func Example3() 
if $start = "true" then 
send($oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 102).value) 
sleep(250) 
send("{tab}") 
sleep(250) 
send($oDocument.cells(10001 + _GUICtrlComboBox_GetCurSel($box), 103).value) 
sleep(250) 
send("{enter}") 
$start = "false" 
guictrlsetpos($lab, 5, 180) 
endif 
EndFunc ;==>WM_VSCROLL 
  
Ваша критика провалилась с полным крахом