Писал скрипт поиска и замены значений по хоткею, поглядывая на скрипт управлением спидхаком. Чувствую что решение близко, но уже мозг не варит. Скажите плз, где косяк и может можно его еще оптимизировать? EnableHotkey =1 function rwr() hideAllCEWindows() showMessage("START?") results=AOBScan("67 2B 00 00", "+W-C-X") if (results~=nil) then count=stringlist_getCount(results) if (count>1) then function No(hotkey) for i = 0, (count-1), 1 do address=stringlist_getString(results,i) if (EnableHotkey==1) then value = 22222 writeInteger(address,value) end end function Norma(hotkey) for i = 0, (count-1), 1 do address=stringlist_getString(results,i) if (EnableHotkey==1) then value = 11111 writeInteger(address,value) end end end end object_destroy(results) results=nil end showMessage("OK") end function myattach(timer) if getProcessIDFromProcessName("game.exe") ~= nil then object_destroy(timer) openProcess("game.exe") rwr() else showMessage("Client not found") closeCE() end f=createForm(false) --create an invisible window t=createTimer(F); timer_setInterval(t,100) --10 might have been too fast for xp... timer_onTimer(t,myattach) end end function SetHotKey(func, hotkey) local objectHotKey = createHotkey(func, hotkey) generichotkey_setKeys(objectHotKey, hotkey) generichotkey_onHotkey(objectHotKey, func) end function onOpenProcess(processid) SetHotKey(No, VK_R) SetHotKey(Norma, VK_V) end