ActiveX Fehlermeldung

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

effel
Posts: 548
Joined: 16 Jan 2018, 13:34

ActiveX Fehlermeldung

21 Jan 2024, 02:42

Hallo guten Morgen,

wenn ich links in der GUI auf den Pegelstand klicke, sehe ich das png rechts eingeblendet. So soll es auch sein

Code: Select all

https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/a6ee8177-107b-47dd-bcfd-30960ccc6e9c/W/measurements.png?start=P29D&width=800&height=650
Die folgende Grafik ist dynamisch, erzeugt zwei Fehlermeldungen und zeigt die Grafik leider nicht an. Kommt hier AHK an seine Grenzen? oder gibt es noch eine andere Möglichkeit den zweiten Link zu nutzen?

Code: Select all

https://www.pegelonline.wsv.de/webservices/zeitreihe/visualisierung?parameter=Wasserstand%20Rohdaten&pegeluuid=a6ee8177-107b-47dd-bcfd-30960ccc6e9c&ansicht=einzeln


Code: Select all

if inStr(thisContent,"Uhr") && inStr(thisContent,"-Pegel")  && inStr(thisContent,":") ;  && (A_EventInfo=12)
{
if (thisTogglePegel:=!thisTogglePegel)
{
	GuiControl, h%atickCount%:    hide, 			TMPListViewtest%atickCount%
	GuiControl, h%atickCount%:    show, 			WB
	Gurl := "https://www.pegelonline.wsv.de/webservices/zeitreihe/visualisierung?parameter=Wasserstand%20Rohdaten&pegeluuid=a6ee8177-107b-47dd-bcfd-30960ccc6e9c&ansicht=einzeln"
	Gurl :="https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/a6ee8177-107b-47dd-bcfd-30960ccc6e9c/W/measurements.png?start=P29D&width=800&height=650"
	WB.Navigate(Gurl)
	} else {
	GuiControl, h%atickCount%:    hide, 			WB
	GuiControl, h%atickCount%:    show, 			TMPListViewtest%atickCount%
}}

A.jpg
A.jpg (170.03 KiB) Viewed 375 times
B.jpg
B.jpg (167.55 KiB) Viewed 375 times
garry
Posts: 3787
Joined: 22 Dec 2013, 12:50

Re: ActiveX Fehlermeldung

21 Jan 2024, 16:59

keine Lösung , zeigt hier lediglich https://www.pegelonline.wsv.de/gast/start oder https://www.pegelonline.wsv.de/gast/pegeltabelle an und man kann hier im GUI weiterklicken

Code: Select all

#Warn
#NoEnv
#SingleInstance Force
SetBatchLines -1
ListLines Off
setworkingdir,%a_scriptdir%

WA:=A_screenwidth,HA:=A_screenheight,xx:=100
x:=(WA*1)/xx,y:=(ha*1)/xx,w:=(wa*8)/xx
filename1=Browser TEST
Gui,2:default
Gui,2: -dpiscale 
Gui,2: Color,black
Gui,2:font,s14,Lucida Console
Gui,2: +LastFound +alwaysontop
gosub,e4xx
;urlx:="https://www.pegelonline.wsv.de/gast/start"
urlx:="https://www.pegelonline.wsv.de/gast/pegeltabelle"
x:=(WA*1)/xx,y:=(ha*2)/xx,w:=(wa*45)/xx,h:=(ha*2.7)/xx
Gui,2: Add, Edit  ,x%x% y%y% w%w% h%h% vURL,%urlx%
x:=(WA*47)/xx,y:=(ha*2)/xx,w:=(wa*7)/xx,h:=(ha*2.7)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gClear1,<CLEAR
x:=(WA*55)/xx,y:=(ha*2)/xx,w:=(wa*15)/xx
Gui,2:Add, DropDownList,x%x% y%y% w%w% r10 vUrlDDL gA1,%e4x%
x:=(WA*2)/xx,y:=(ha*6)/xx,w:=(wa*3)/xx
Gui,2: Add, Button, x%x% y%y% w%w%  gBrB, <
x:=(WA*6)/xx,y:=(ha*6)/xx,w:=(wa*3)/xx
Gui,2: Add, Button, x%x% y%y% w%w% gBrF, >
x:=(WA*10)/xx,y:=(ha*6)/xx,w:=(wa*3)/xx,h:=(ha*2.7)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% Default gA2, Go

x:=(WA*1)/xx,y:=(ha*10)/xx,w:=(wa*72)/xx,h:=(ha*83)/xx
Gui,2: Add, ActiveX,x%x% y%y% w%w% h%h% vWB, Shell.Explorer
ComObjConnect(WB, WB_events)
ComObjError(false)
wb.Silent := True
x:=(WA*1)/xx,y:=(ha*1)/xx,w:=(wa*75)/xx,h:=(ha*95)/xx
Gui,2: Show,x%x% y%y% w%w% h%h%,%filename1%
GuiControl,2: ChooseString,urlddl,Asia_weather_warning
sleep,400
WB.Navigate(urlx)
return
;------------------------
2GuiClose:
ExitApp
;------------------------
A2:
Gui,2:submit,nohide
WB.Navigate(url)
return
;-----------------------
clear1:
Gui,2:submit,nohide
GuiControl,2:,url
return
;------------------------
a1:
Gui,2: Submit, NoHide
stringsplit,h,urlddl,$
H2=%h2%
WB.Navigate(h2)
return
;--------------------
Brb:
try WB.GoBack()
return
;--------------------
BrF:
try WB.GoForward()
return
;--------------------
class WB_events
{
NavigateComplete2(wb, NewURL)
    {
    GuiControl,2:,URL,%NewURL%
    }
}
;---------------------
e4xx:
Gui,2:submit,nohide
a3:="https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations/a6ee8177-107b-47dd-bcfd-30960ccc6e9c/W/measurements.png?start=P29D&width=800&height=650"
Asia_weather_warning:="https://www.metoc.navy.mil/jtwc/jtwc.html"


e4x:=""
e4x=
(Ltrim Join|
Test2                        $%a3%
Asia_weather_warning         $%Asia_weather_warning%
)
return
;==============================================
effel
Posts: 548
Joined: 16 Jan 2018, 13:34

Re: ActiveX Fehlermeldung

22 Jan 2024, 11:11

garry wrote:
21 Jan 2024, 16:59
Hallo @garry , gute Idee die Webseiten auf einer extra GUI zu zeigen, danke für den Code
effel
Posts: 548
Joined: 16 Jan 2018, 13:34

Re: ActiveX Fehlermeldung

23 Jan 2024, 03:03

Ich habe die Lösung gefunden, danke fürs lesen

viewtopic.php?p=429754#p429754 vom 15. Nov 2021


Unbenannt.png
Unbenannt.png (110.16 KiB) Viewed 268 times


Kann man auch nur den unteren Teil der Webseite anzeigen?


https://www.pegelonline.wsv.de/webservices/zeitreihe/visualisierung?parameter=Wasserstand%20Rohdaten&pegeluuid=b475386c-30cc-453a-b3b7-1d17ace13595

Code: Select all

Gui Add, Edit, w930 r1 vURL,% url:="https://www.pegelonline.wsv.de/webservices/zeitreihe/visualisierung?parameter=Wasserstand%20Rohdaten&pegeluuid=b475386c-30cc-453a-b3b7-1d17ace13595"
Gui Add, Button, x+6 yp w44 Default, Go
Gui Add, ActiveX, xm w980 h640 vWB, Shell.Explorer
; ComObjConnect(WB, WB_events)  ; Connect WB's events to the WB_events class object.
Gui Show
; Continue on to load the initial page:
WB.Silent := 1      ;Disabling annoying script errors
ButtonGo:
Gui Submit, NoHide
WB.Navigate(URL)
while WB.busy
   Sleep, 100
msgbox,,, % WB.Document.body.innerText,1
return

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 10 guests