Тема: AHK: Chrome_ahk
Добрый день! Подскажите пож-та, возможно работать сразу с несколькими вкладками в хроме?
#SingleInstance force
#Include Chrome.ahk ; https://www.autohotkey.com/boards/viewtopic.php?t=42890
FileCreateDir, ChromeProfile
ChromeInst := new Chrome("ChromeProfile")
PageInstance := ChromeInst.GetPage()
PageInstance.Call("Page.navigate", {"url": "https://www.google.com/"})
PageInstance.WaitForLoad()
PageInstance.Evaluate("document.getElementsByClassName('gLFyf gsfi')[0].value= 'WTF';")
MsgBox % PageInstance.Evaluate("document.getElementsByClassName('gLFyf gsfi')[0].value;").value
ChromeInst_1 := new Chrome("ChromeProfile")
PageInstance_1 := ChromeInst_1.GetPage()
PageInstance_1.Call("Page.navigate", {"url": "https://www.yahoo.com/"})
PageInstance_1.WaitForLoad()
PageInstance_1.Evaluate("document.getElementById('uh-search-box').value= 'WTF';")
MsgBox % PageInstance_1.Evaluate("document.getElementById('uh-search-box').value;").value
PageInstance.Call("Browser.close")
PageInstance.Disconnect()
PageInstance_1.Call("Browser.close")
PageInstance_1.Disconnect()
ExitApp