Тема: AHK: IE_COM_выбор из списка
Добрый вечер, подскажите как можно сделать выбор из списка? В окне хрома и IE в консоли ошибок не возникает, но и ничего не меняется.
url := "https://ise.mos.ru"
; результат получаю
MsgBox % ie.document.querySelector("select[Name=""p_t05""]").value "_" ie.document.querySelector("select[Name=""p_t05""]").selectedIndex
; не работает
ie.document.getElementById("P681_TYPE").Focus()
ie.document.getElementById("P681_TYPE").value := 31 ; "31"
..
ie.document.getElementById("P681_TYPE").value := 31 ; "31"
....
ie.document.getElementById("P681_TYPE").selectedIndex := "2" ; 2
..
ie.document.getElementById("P681_TYPE").selectedIndex := "2" ; 2
ie.document.getElementById("P681_TYPE").onchange()
....
ie.document.querySelector("select[Name=""p_t05""]").selectedIndex := 4
ie.document.querySelector("select[Name=""p_t05""]").value := 32
..........
ie.document.querySelector("select[Name='p_t05']").value := 32
Event := ie.document.createEvent("Event")
Event.initEvent("select", False, False)
ie.document.querySelector("select[Name='p_t05']").dispatchEvent(Event)
.......
MouseDownEvent := IE.document.createEvent("MouseEvent")
MouseDownEvent.initMouseEvent("mousedown",true,false, _, _, _, _, _, _, _, _, _, _, _, _)
MouseUpEvent := IE.document.createEvent("MouseEvent")
MouseUpEvent.initMouseEvent("mouseup",true,false, _, _, _, _, _, _, _, _, _, _, _, _)
ie.document.querySelector("select[Name=""p_t05""]").dispatchEvent(MouseDownEvent)
ie.document.querySelector("select[Name=""p_t05""]").dispatchEvent(MouseUpEvent)
apex.da.initDaEventList = function(){
apex.da.gEventList = [
{"triggeringElement":"P681_QUATER","triggeringElementType":"ITEM","bindType":"bind","bindEventType":"change",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.submitPage,"attribute02":"Y","action":"NATIVE_SUBMIT_PAGE"}]},
{"triggeringElement":"P681_YEAR","triggeringElementType":"ITEM","bindType":"bind","bindEventType":"change",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.submitPage,"attribute02":"Y","action":"NATIVE_SUBMIT_PAGE"}]},
{"triggeringElement":"document","triggeringElementType":"DOM_OBJECT","bindType":"bind","bindEventType":"ready",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ var _name;
if ($v('P681_TYPE') == '1') _name = 'ЭЭ'
else if ($v('P681_TYPE') == '2') _name = 'ТЭ'
else if ($v('P681_TYPE') == '31') _name = 'ХВС'
else if ($v('P681_TYPE') == '32') _name = 'ГВС'
else if ($v('P681_TYPE') == '4') _name = 'Газ'
var _name;
if ($v('P632_TYPE') == '1') _name = 'ЭЭ'
else if ($v('P632_TYPE') == '2') _name = 'ТЭ'
else if ($v('P632_TYPE') == '31') _name = 'ХВС'
else if ($v('P632_TYPE') == '32') _name = 'ГВС'
else if ($v('P632_TYPE') == '4') _name = 'Газ'
$('.apexir_WORKSHEET_DATA tbody tr').first().before('<tr id="irColGrpRow1"><th colspan="4"></th><th colspan="23">' + _name)
},"action":"NATIVE_JAVASCRIPT_CODE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"B1703318217089378584","bindType":"live","bindEventType":"click",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ if ($v('apexir_SEARCH'))
gReport.search('SEARCH');},"action":"NATIVE_JAVASCRIPT_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"57FE04DF9A18FBC16000B821B81A245348A287FE4F51B2A984FD6AFE57CF0D93","attribute01":"P681_DEPARTMENT_TYPE,P681_FILTER_BLD_TYPE,P681_FILTER_RENT","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.submitPage,"attribute02":"Y","action":"NATIVE_SUBMIT_PAGE"}]},
{"triggeringElementType":"BUTTON","triggeringButtonId":"B1703318401312378586","bindType":"live","bindEventType":"click",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.executePlSqlCode,"ajaxIdentifier":"5097AF6DA49B5BCF56D28E3C92BE055FA62AF4F2F2CF3863DACDE24605744F9F","attribute01":"P681_DATE_FROM,P681_DATE_TILL,P681_DEPARTMENT_TYPE,P681_FILTER_BLD_TYPE,P681_FILTER_RENT","attribute04":"N","action":"NATIVE_EXECUTE_PLSQL_CODE"},{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:apex.da.submitPage,"attribute02":"Y","action":"NATIVE_SUBMIT_PAGE"}]},
{"triggeringElementType":"REGION","triggeringRegionId":"R1703319202272378594","triggeringButtonId":"B1703318401312378586","bindType":"bind","bindEventType":"change",actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){ var _name;
if ($v('P681_TYPE') == '1') _name = 'ЭЭ'
else if ($v('P681_TYPE') == '2') _name = 'ТЭ'
else if ($v('P681_TYPE') == '31') _name = 'ХВС'
else if ($v('P681_TYPE') == '32') _name = 'ГВС'
else if ($v('P681_TYPE') == '4') _name = 'Газ'