Das funktioniert und ich bin echt begeistert. Wenn das jetzt noch im Hintergund läuft wäre es supergregster wrote: ↑15 May 2020, 03:51Ah gut, dann probier erstmalOptimus Prime wrote: ↑15 May 2020, 03:40Jetzt wird die IP über Chrome geöffnet. Fehlt noch die Ansteuerung und not visible wäre ein Traumeinzufügen, unter Page.WaitForLoad().Code: Select all
Page.Evaluate("document.getElementById('ui_btn_2_1').click()")
Aktueller Stand:
Code: Select all
#NoEnv
SetBatchLines, -1
SetTitleMatchMode 2
#Include Chrome.ahk ; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=42890
url := "http://192.168.120.176" ; füge deine IP ein
; --- Create a new Chrome instance ---
FileCreateDir, ChromeProfile ; creates a profile subdirectory in current folder
ChromeInst := new Chrome("ChromeProfile")
winwait, - Google Chrome
; --- Connect to the page ---
if !(Page := ChromeInst.GetPage( , , "fnCallback" )) ; connect to callback function
{
MsgBox, Could not retrieve page!
ChromeInst.Kill()
}
else
Page.WaitForLoad()
Page.Call("Page.navigate", {"url": url}) ; Navigate to url
Page.WaitForLoad()
Page.Evaluate("document.getElementById('ui_btn_2_1').click()")
return
Esc::ExitApp