Post by effel » 13 Nov 2023, 10:16
garry wrote: ↑12 Nov 2023, 09:19
@effel hast Du eine Schnittstelle an USB um all diese Sachen zu steuern ... z.B. Steckdose ein/ausschalten etc ?
was macht 'Telegram' ?
Hallo
@garry , nein ich habe keine Schnittstelle für die geplanten Aktionen, Es gibt aber für Alexa und Autohotkey Möglichkeiten zusammen zu arbeiten
Meine Google Recherche ergab:
https://www.google.com/search?q=site%3A ... e&ie=UTF-8
Es ist möglich, AutoHotkey zu verwenden, um Alexa zu steuern. Eine Möglichkeit besteht darin, den Windows-Client
von Triggercmd zu installieren und Alexa-Befehle als Schalter zu erstellen. Mit Hilfe von Drittprogrammen wie
AutoHotkey können Sie dann fast alles steuern, was auf Ihrem Computer ausgeführt wird 1. Hier ist eine Kurzanleitung,
die Ihnen helfen kann, Ihren PC mit Alexa zu steuern
Erstellen Sie einen Account bei Triggercmd
Aktivieren Sie den Skill “Triggercmd Smart Home” in Alexa
Installieren Sie den Windows-Client und geben Sie den Key ein, der in Ihrem Account hinterlegt ist
Nachdem Sie diese Schritte ausgeführt haben, können Sie Befehle erstellen, um Programme oder Parameter auszuführen.
Mit AutoHotkey können Sie dann fast alles steuern, was auf Ihrem Computer ausgeführt wird
Es gibt noch weitere
Skills wie z.B die Möglichkeit an der FritzBox angemeldete Smart Home Geräte zu steuern.
Aber soweit bin ich noch lange nicht. Daher nutze ich das immer gleiche
ScreenShot.ahk Script, um meine Trigger zu testen.
Den Trigger für eine Telegram Message kann man schon mit AHK umsetzen.
Zur Zeit übe ich mich mit dem Layout, welches mit deinen Berechnungsgrundlagen zum Kinderspiel wird. Es ist wie arbeiten auf Millimeterpapier.
- 0037.png (72.75 KiB) Viewed 865 times
Code: Select all
Gui +AlwaysOnTop -DPIScale hwndGUIHWND
;-
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
/*
;doro
;Name: \\.\DISPLAY1
;Position: (0|0)
;Size: 1366x768
;Is primary? Yes
;Name: \\.\DISPLAY2
;Position: (1366|0)
;Size: 1360x768
;Is primary? No
*/
zoomfactor:=((A_ScreenWidth/1920)*(96/A_ScreenDPI))
;Fs10:= Round(10 * ZoomFactor, 0)
Fs8 :=(8*zoomfactor)
Fs9 :=(9*zoomfactor)
Fs10 :=(10*zoomfactor)
Fs105 :=(10.5*zoomfactor)
Fs11 :=(11*zoomfactor)
Fs12 :=(12*zoomfactor)
Fs16 :=(16*zoomfactor)
;=============================================================
color=D4D0C8
; Gui,1:Color,Black,Black
; Gui,1:Color,Gray,Black
Gui,1:Color,Silver,Black
Gui,1:add,text,x0 y0 vT1
; Gui, Font, s%fs16% cYellow Bold, Verdana
Gui, Font, s%fs16% cBlack Bold, Verdana
;-
ListViewEinUndAusblenden := 1
x:=(wa*0)/xx,y:=(ha*1)/xx,w:=(wa*30)/xx ;- w ist gui width
; Gui, Add, text,x%x% y%y% w%w% vTextEdit1 hwndhTextEdit1 center section gGeplanteTrigger ,% A_DDDD a_space A_DD "." Month(A_MM) "." a_YYYY " " A_Hour ":" A_Min ":" A_Sec " Uhr" ; timestamp
Gui, Add, text,x%x% y%y% w%w% vTextEdit1 hwndhTextEdit1 center section gListViewEinUndAusblenden ,% A_DDDD a_space A_DD "." Month(A_MM) "." a_YYYY " " A_Hour ":" A_Min ":" A_Sec " Uhr" ; timestamp
;-
Gui, Font, s%fs11% normal,
;-
x:=(wa*1.1)/xx,y:=(ha*5.2)/xx
Gui, Add, text, x%x% y%y% , Trigger:
;-
Gui, Font, s%fs11% normal,
x:=(wa*4.5)/xx,y:=(ha*5)/xx,w:=(wa*1.6)/xx,h:=(ha*2.2)/xx
Gui, Add, edit, x%x% y%y% w%w% h%h% vSonnenEditStunden hwndhSsonnenEditStunden section cWhite center, 00
;-
Gui, Font, s%fs11% normal,
x:=(wa*6.5)/xx,y:=(ha*5.2)/xx
Gui, Add, text, x%x% y%y%, Stunden
;-
Gui, Font, s%fs11% normal,
x:=(wa*10)/xx,y:=(ha*5)/xx,w:=(wa*1.6)/xx,h:=(ha*2.2)/xx
Gui, Add, edit, x%x% y%y% w%w% h%h% vSonnenEditMinuten hwndhSsonnenEditMinuten cWhite center, 02
;-
Gui, Font, s%fs11% normal,
x:=(wa*12)/xx,y:=(ha*5.2)/xx
Gui, Add, text, x%x% y%y% , Minuten
;-
Gui, Font, s%fs11% normal,
;-
x:=(wa*15.5)/xx,y:=(ha*5)/xx,w:=(wa*13.5)/xx
Gui, Add, DropDownList, x%x% y%y% w%w% r15 section vddl1 choose1, %a_space%Trigger auswählen... ; %Trigger auswählen...
| vor Sonnenaufgang
| nach Sonnenaufgang
| vor Sonnenuntergang
| nach Sonnenuntergang
| nach MEZ > MESZ Wechsel
| nach MESZ > MEZ Wechsel
| nach Morgen 07 bis 11 Uhr
| nach Vormittag 11:00 bis 13 Uhr
| nach Mittag 13 bis 15 Uhr
| nach Nachmittag 15 bis 18 Uhr
| nach Abend 18 bis 22 Uhr
| nach Nacht 22 bis 7 Uhr
| nach Sturmwarnung
| nach Pollenwarnung
;-
x:=(wa*1)/xx, y:=(ha*8.5)/xx, w:=(wa*28)/xx
Gui, Add, DropDownList,x%x% y%y% w%w% vddl3 choose1, %a_space%Trigger Datei auswählen... ; Trigger Datei auswählen...
| Öffnen...
| Telegram Msg an Service
| Telegram Msg an Bereitschaft
| Lüftung Raum G einschalten
| Lüftung Raum G ausschalten
| Heizung einschalten
| Heizung ausschalten
| Heizung 21 Grad
| Markiese Wohnzimmer einfahren
| Markiese Wohnzimmer 50 `%
| Markiese Wohnzimmer ausfahren
| Jalousien Küche rauf
| Jalousien Küche 50 `%
| Jalousien Küche runter
| Beleuchtung Hof Lampe 1B einschalten
| Beleuchtung Hof Lampe 1B ausschalten
| Steckdose xP-23 (Lager) einschalten
| Steckdose xP-23 (Lager) ausschalten
| Alarmanlage Zugang 1 aktivieren
| Alarmanlage Zugang 1 ausschalten
;-
Gui, Font, s%fs11% normal, ; Wiederholen
x:=(wa*1)/xx, y:=(ha*12.1)/xx, w:=(wa*28)/xx, h:=(ha*4.8)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxA, %a_Space%Wiederholen%a_Space%
;-
Gui, Font, s%fs11% normal,
x:=(wa*1.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioEinmal hwndhRadioEinmal section , einmal
x:=(wa*6)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioTäglich hwndhRadioTäglich checked , täglich
x:=(wa*10.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioWöchendlich hwndhRadioWöchendlich , wöchendlich
x:=(wa*17.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioMonatlich hwndhRadioMonatlich , monatlich
x:=(wa*23.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioJährlich hwndhRadioJährlich , jährlich
color=Aqua
color=Teal
color=Silver
Gui, Font, s%fs11% normal, ; Geplante Trigger:
x:=(wa*1)/xx, y:=(ha*21.2)/xx, w:=(wa*28)/xx, h:=(ha*2.0)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% vGroupBoxÜberListView1 background%color% cBlack , %a_Space%Geplante Trigger:%a_Space% ; GroupBox ÜberListView1
Gui, Font, s%fs10% normal, ; Geplante Trigger:
x:=(wa*22.5)/xx, y:=(ha*18.0)/xx
Gui, Add, button, x%x% y%y% vÜbernehmen hwndhÜbernehmen , Übernehmen ; Übernehmen
;-
; Gui, Font
; Gui, Font, normal
Gui, Font, s%fs11% normal, ; GroupBox unter trigger_listview
x:=(wa*1)/xx, y:=(ha*42.0)/xx, w:=(wa*28)/xx, h:=(ha*4.8)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% vGroupBoxUnterListView1
Gui, Font, s%fs9% normal, ; ListView1
; color=D4D0C8
x:=(wa*1)/xx, y:=(ha*23)/xx, w:=(wa*28)/xx, h:=(ha*20)/xx
Gui, Add, listview, x%x% y%y% w%w% h%h% vListView1 hwndhListView1 grid background%color% cBlack , HH|MM|Trigger|Trigger File
T1:=(wa*2)/xx,T2:=(wa*2)/xx,T3:=(wa*6)/xx,T4:=(wa*16.5)/xx
LV_ModifyCol(1,T1),LV_ModifyCol(2,T2),LV_ModifyCol(3,T3),LV_ModifyCol(4,T4)
; MainArray["nextScheduledAction"]
;-
; //////////////////////////////////////////////////////////////////////////////////// button mehr...
; Gui,1: Add, GroupBox , vmehr ; Maß nehmen
Gui,1: Add, button , vmehr Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*25.0)/xx
y:=(ha*43.5)/xx
w:=(wa*3.5)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, mehr, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, mehr
GuiControl,1: , mehr, mehr...
GuiControl,1: show, mehr
; GuiControl,1: hide, mehr
; GuiControl,1: focus, mehr
GuiControl,1: disable, mehr
; GuiControl,1: enable, mehr
; //////////////////////////////////////////////////////////////////////////////////// button Markierte Einträge im trigger_listview Löschen
; Gui,1: Add, GroupBox , vMarkierteLöschen ; Maß nehmen
Gui,1: Add, button , vMarkierteLöschen Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*17.1)/xx
y:=(ha*43.5)/xx
w:=(wa*7.6)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, MarkierteLöschen, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, MarkierteLöschen
GuiControl,1: , MarkierteLöschen, Markierte löschen
GuiControl,1: show, MarkierteLöschen
; GuiControl,1: hide, MarkierteLöschen
; GuiControl,1: focus, MarkierteLöschen
; GuiControl,1: disable, MarkierteLöschen
; GuiControl,1: enable, MarkierteLöschen
; //////////////////////////////////////////////////////////////////////////////////// button trigger_listview Liste exportieren
; Gui,1: Add, GroupBox , vListeExportieren ; Maß nehmen
Gui,1: Add, button , vListeExportieren Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*9.3)/xx
y:=(ha*43.5)/xx
w:=(wa*7.4)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, ListeExportieren, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, ListeExportieren
GuiControl,1: , ListeExportieren, Liste exportieren
GuiControl,1: show, ListeExportieren
; GuiControl,1: hide, ListeExportieren
; GuiControl,1: focus, ListeExportieren
; GuiControl,1: disable, ListeExportieren
; GuiControl,1: enable, ListeExportieren
; //////////////////////////////////////////////////////////////////////////////////// button Liste importieren
; Gui,1: Add, GroupBox , vListeImportieren ; Maß nehmen
Gui,1: Add, button , vListeImportieren Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*1.5)/xx,
y:=(ha*43.5)/xx
w:=(wa*7.4)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, ListeImportieren, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, ListeImportieren
GuiControl,1: , ListeImportieren, Liste importieren
GuiControl,1: show, ListeImportieren
; GuiControl,1: hide, ListeImportieren
; GuiControl,1: focus, ListeImportieren
; GuiControl,1: disable, ListeImportieren
; GuiControl,1: enable, ListeImportieren
; ////////////////////////////////////////////////////////////////////////////////////
;-
Gui, Font, s%fs11% normal, ; Nächste System Aktion
x:=(wa*1)/xx, y:=(ha*47.5)/xx, w:=(wa*28)/xx, h:=(ha*4.2)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% cBLUE, %a_Space%Nächste System Aktion:%a_Space%
Gui, Font, s%fs11% normal, ; Nächste System Aktion
x:=(wa*2.5)/xx, y:=(ha*49.5)/xx, w:=(wa*26)/xx, h:=(ha*2.2)/xx
Gui, Add, text, x%x% y%y% w%w% h%h% vNächsteGeplanteAction cBLUE
;- GuiControl,, NächsteGeplanteAction,% MainArray["nextScheduledAction"]
;-
Gui, Font, s%fs11% normal, ; LOG
x:=(wa*1)/xx, y:=(ha*52.8)/xx, w:=(wa*28)/xx, h:=(ha*2.11)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% , %a_Space%Log:%a_Space%
;----------------------------------------------
Gui, Font, s%fs11% normal, ; GroupBox unter LOGListview
x:=(wa*1)/xx, y:=(ha*73.7)/xx, w:=(wa*28)/xx, h:=(ha*4.8)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% vGroupBoxUnterLOGListview
;----------------------------------------------
; //////////////////////////////////////////////////////////////////////////////////// button Log Liste Exportieren
; Gui,1: Add, GroupBox , vLogListeExportieren ; Maß nehmen
Gui,1: Add, button , vLogListeExportieren Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*19.5)/xx,
y:=(ha*75.2)/xx
w:=(wa*8.4)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, LogListeExportieren, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, LogListeExportieren
GuiControl,1: , LogListeExportieren, Logdaten exportieren
GuiControl,1: show, LogListeExportieren
; GuiControl,1: hide, LogListeExportieren
; GuiControl,1: focus, LogListeExportieren
; GuiControl,1: disable, LogListeExportieren
; GuiControl,1: enable, LogListeExportieren
; ////////////////////////////////////////////////////////////////////////////////////
Gui, Font, s%fs9% normal, ;
x:=(wa*1)/xx, y:=(ha*54.8)/xx, w:=(wa*28)/xx, h:=(ha*20)/xx
Gui, Add, listview, x%x% y%y% w%w% h%h% vLV1 hwndhLV1 grid background%color% cBlack , Timestamp|ThisLabel|Name
T1:=(wa*1.9)/xx,T2:=(wa*1.9)/xx,T3:=(wa*6)/xx ; ,T4:=(wa*17)/xx
LV_ModifyCol(1,T1),LV_ModifyCol(2,T2),LV_ModifyCol(3,T3) ; ,LV_ModifyCol(4,T4)
; GuiControl,1: hide, LV1
; ////////////////////////////////////////////////////////////////////////////////////
;-
Gui, Font, s%fs11% normal,
x:=(wa*30)/xx, y:=(ha*1)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxB, %a_Space%Sonne%a_Space%
x:=(wa*30)/xx, y:=(ha*17)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxC, %a_Space%Mond%a_Space%
x:=(wa*30)/xx, y:=(ha*33)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxD, %a_Space%Wetter%a_Space%
x:=(wa*30)/xx, y:=(ha*49)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxE, %a_Space%Umwelt%a_Space%
;-
;----
; https://www.autohotkey.com/boards/viewtopic.php?p=39229#p39229
; Bildschirmbreite ermitteln, ZoomFaktor berechnen (100%=1920px)
; Berechnung der korrigierten Pixel als Variable Ln
loop, 2000
L%A_Index% := Round(A_Index * ZoomFactor, 0)
WinGetPos, X, Y, Width, SysWinHoehe, ahk_class Shell_TrayWnd
hoehe := L1080 - SysWinHoehe
showGUIzweiFULL := 0
if showGUIzweiFULL
{
;Gui, 1: -Border
;gui,show, x0 y0 w%L1920% h%A_screenHeight% ,% strReplace((substr(a_scriptname,-11)),".ahk")
gui,show, x0 y0 w%L1920% h%L1080% ,% strReplace((substr(a_scriptname,-11)),".ahk")
} else {
x:=(wa*29)/xx,y:=(ha*10)/xx,w:=(wa*65)/xx,h:=(ha*80)/xx
gui,show,x%x% y%y% w%w% h%h% ,% strReplace((substr(a_scriptname,-11)),".ahk")
}
GuiControl,1: Focus,LV1
return
guiclose:
exitapp
return
ListViewEinUndAusblenden: ;
gui, submit, nohide
;GuiControlGet, ListViewEinUndAusblenden
ListViewEinUndAusblenden := (ListViewEinUndAusblenden:=!ListViewEinUndAusblenden)
Return
Month(thisMonth) {
Month := strSplit("Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez",",")
return Month[thisMonth]
}
GeplanteTrigger:
;reload
msgbox,4096,% "Zeile:`t" a_lineNumber, Test geplanter Trigger, 4
return
[quote=garry post_id=546701 time=1699798769 user_id=56225]
@effel hast Du eine Schnittstelle an USB um all diese Sachen zu steuern ... z.B. Steckdose ein/ausschalten etc ?
was macht 'Telegram' ?[/quote]
Hallo [mention]garry[/mention] , nein ich habe keine Schnittstelle für die geplanten Aktionen, Es gibt aber für Alexa und Autohotkey Möglichkeiten zusammen zu arbeiten
Meine Google Recherche ergab:
[c]https://www.google.com/search?q=site%3Aautohotkey.com+alexa+Triggercmd&rlz=1C1CHBD_deDE898DE898&oq=site%3Aautohotkey.com+alexa+Triggercmd&aqs=chrome..69i57j6i58.10224j0j4&sourceid=chrome&ie=UTF-8[/c]
[c]Es ist möglich, AutoHotkey zu verwenden, um Alexa zu steuern. Eine Möglichkeit besteht darin, den Windows-Client
von Triggercmd zu installieren und Alexa-Befehle als Schalter zu erstellen. Mit Hilfe von Drittprogrammen wie
AutoHotkey können Sie dann fast alles steuern, was auf Ihrem Computer ausgeführt wird 1. Hier ist eine Kurzanleitung,
die Ihnen helfen kann, Ihren PC mit Alexa zu steuern
Erstellen Sie einen Account bei Triggercmd
Aktivieren Sie den Skill “Triggercmd Smart Home” in Alexa
Installieren Sie den Windows-Client und geben Sie den Key ein, der in Ihrem Account hinterlegt ist
Nachdem Sie diese Schritte ausgeführt haben, können Sie Befehle erstellen, um Programme oder Parameter auszuführen.
Mit AutoHotkey können Sie dann fast alles steuern, was auf Ihrem Computer ausgeführt wird[/c]
Es gibt noch weitere [c]Skills[/c] wie z.B die Möglichkeit an der FritzBox angemeldete Smart Home Geräte zu steuern.
Aber soweit bin ich noch lange nicht. Daher nutze ich das immer gleiche [c]ScreenShot.ahk[/c] Script, um meine Trigger zu testen.
Den Trigger für eine Telegram Message kann man schon mit AHK umsetzen.
Zur Zeit übe ich mich mit dem Layout, welches mit deinen Berechnungsgrundlagen zum Kinderspiel wird. Es ist wie arbeiten auf Millimeterpapier.
[attachment=0]0037.png[/attachment]
[code]Gui +AlwaysOnTop -DPIScale hwndGUIHWND
;-
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
/*
;doro
;Name: \\.\DISPLAY1
;Position: (0|0)
;Size: 1366x768
;Is primary? Yes
;Name: \\.\DISPLAY2
;Position: (1366|0)
;Size: 1360x768
;Is primary? No
*/
zoomfactor:=((A_ScreenWidth/1920)*(96/A_ScreenDPI))
;Fs10:= Round(10 * ZoomFactor, 0)
Fs8 :=(8*zoomfactor)
Fs9 :=(9*zoomfactor)
Fs10 :=(10*zoomfactor)
Fs105 :=(10.5*zoomfactor)
Fs11 :=(11*zoomfactor)
Fs12 :=(12*zoomfactor)
Fs16 :=(16*zoomfactor)
;=============================================================
color=D4D0C8
; Gui,1:Color,Black,Black
; Gui,1:Color,Gray,Black
Gui,1:Color,Silver,Black
Gui,1:add,text,x0 y0 vT1
; Gui, Font, s%fs16% cYellow Bold, Verdana
Gui, Font, s%fs16% cBlack Bold, Verdana
;-
ListViewEinUndAusblenden := 1
x:=(wa*0)/xx,y:=(ha*1)/xx,w:=(wa*30)/xx ;- w ist gui width
; Gui, Add, text,x%x% y%y% w%w% vTextEdit1 hwndhTextEdit1 center section gGeplanteTrigger ,% A_DDDD a_space A_DD "." Month(A_MM) "." a_YYYY " " A_Hour ":" A_Min ":" A_Sec " Uhr" ; timestamp
Gui, Add, text,x%x% y%y% w%w% vTextEdit1 hwndhTextEdit1 center section gListViewEinUndAusblenden ,% A_DDDD a_space A_DD "." Month(A_MM) "." a_YYYY " " A_Hour ":" A_Min ":" A_Sec " Uhr" ; timestamp
;-
Gui, Font, s%fs11% normal,
;-
x:=(wa*1.1)/xx,y:=(ha*5.2)/xx
Gui, Add, text, x%x% y%y% , Trigger:
;-
Gui, Font, s%fs11% normal,
x:=(wa*4.5)/xx,y:=(ha*5)/xx,w:=(wa*1.6)/xx,h:=(ha*2.2)/xx
Gui, Add, edit, x%x% y%y% w%w% h%h% vSonnenEditStunden hwndhSsonnenEditStunden section cWhite center, 00
;-
Gui, Font, s%fs11% normal,
x:=(wa*6.5)/xx,y:=(ha*5.2)/xx
Gui, Add, text, x%x% y%y%, Stunden
;-
Gui, Font, s%fs11% normal,
x:=(wa*10)/xx,y:=(ha*5)/xx,w:=(wa*1.6)/xx,h:=(ha*2.2)/xx
Gui, Add, edit, x%x% y%y% w%w% h%h% vSonnenEditMinuten hwndhSsonnenEditMinuten cWhite center, 02
;-
Gui, Font, s%fs11% normal,
x:=(wa*12)/xx,y:=(ha*5.2)/xx
Gui, Add, text, x%x% y%y% , Minuten
;-
Gui, Font, s%fs11% normal,
;-
x:=(wa*15.5)/xx,y:=(ha*5)/xx,w:=(wa*13.5)/xx
Gui, Add, DropDownList, x%x% y%y% w%w% r15 section vddl1 choose1, %a_space%Trigger auswählen... ; %Trigger auswählen...
| vor Sonnenaufgang
| nach Sonnenaufgang
| vor Sonnenuntergang
| nach Sonnenuntergang
| nach MEZ > MESZ Wechsel
| nach MESZ > MEZ Wechsel
| nach Morgen 07 bis 11 Uhr
| nach Vormittag 11:00 bis 13 Uhr
| nach Mittag 13 bis 15 Uhr
| nach Nachmittag 15 bis 18 Uhr
| nach Abend 18 bis 22 Uhr
| nach Nacht 22 bis 7 Uhr
| nach Sturmwarnung
| nach Pollenwarnung
;-
x:=(wa*1)/xx, y:=(ha*8.5)/xx, w:=(wa*28)/xx
Gui, Add, DropDownList,x%x% y%y% w%w% vddl3 choose1, %a_space%Trigger Datei auswählen... ; Trigger Datei auswählen...
| Öffnen...
| Telegram Msg an Service
| Telegram Msg an Bereitschaft
| Lüftung Raum G einschalten
| Lüftung Raum G ausschalten
| Heizung einschalten
| Heizung ausschalten
| Heizung 21 Grad
| Markiese Wohnzimmer einfahren
| Markiese Wohnzimmer 50 `%
| Markiese Wohnzimmer ausfahren
| Jalousien Küche rauf
| Jalousien Küche 50 `%
| Jalousien Küche runter
| Beleuchtung Hof Lampe 1B einschalten
| Beleuchtung Hof Lampe 1B ausschalten
| Steckdose xP-23 (Lager) einschalten
| Steckdose xP-23 (Lager) ausschalten
| Alarmanlage Zugang 1 aktivieren
| Alarmanlage Zugang 1 ausschalten
;-
Gui, Font, s%fs11% normal, ; Wiederholen
x:=(wa*1)/xx, y:=(ha*12.1)/xx, w:=(wa*28)/xx, h:=(ha*4.8)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxA, %a_Space%Wiederholen%a_Space%
;-
Gui, Font, s%fs11% normal,
x:=(wa*1.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioEinmal hwndhRadioEinmal section , einmal
x:=(wa*6)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioTäglich hwndhRadioTäglich checked , täglich
x:=(wa*10.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioWöchendlich hwndhRadioWöchendlich , wöchendlich
x:=(wa*17.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioMonatlich hwndhRadioMonatlich , monatlich
x:=(wa*23.5)/xx,y:=(ha*14.2)/xx
Gui, Add, radio, x%x% y%y% vRadioJährlich hwndhRadioJährlich , jährlich
color=Aqua
color=Teal
color=Silver
Gui, Font, s%fs11% normal, ; Geplante Trigger:
x:=(wa*1)/xx, y:=(ha*21.2)/xx, w:=(wa*28)/xx, h:=(ha*2.0)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% vGroupBoxÜberListView1 background%color% cBlack , %a_Space%Geplante Trigger:%a_Space% ; GroupBox ÜberListView1
Gui, Font, s%fs10% normal, ; Geplante Trigger:
x:=(wa*22.5)/xx, y:=(ha*18.0)/xx
Gui, Add, button, x%x% y%y% vÜbernehmen hwndhÜbernehmen , Übernehmen ; Übernehmen
;-
; Gui, Font
; Gui, Font, normal
Gui, Font, s%fs11% normal, ; GroupBox unter trigger_listview
x:=(wa*1)/xx, y:=(ha*42.0)/xx, w:=(wa*28)/xx, h:=(ha*4.8)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% vGroupBoxUnterListView1
Gui, Font, s%fs9% normal, ; ListView1
; color=D4D0C8
x:=(wa*1)/xx, y:=(ha*23)/xx, w:=(wa*28)/xx, h:=(ha*20)/xx
Gui, Add, listview, x%x% y%y% w%w% h%h% vListView1 hwndhListView1 grid background%color% cBlack , HH|MM|Trigger|Trigger File
T1:=(wa*2)/xx,T2:=(wa*2)/xx,T3:=(wa*6)/xx,T4:=(wa*16.5)/xx
LV_ModifyCol(1,T1),LV_ModifyCol(2,T2),LV_ModifyCol(3,T3),LV_ModifyCol(4,T4)
; MainArray["nextScheduledAction"]
;-
; //////////////////////////////////////////////////////////////////////////////////// button mehr...
; Gui,1: Add, GroupBox , vmehr ; Maß nehmen
Gui,1: Add, button , vmehr Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*25.0)/xx
y:=(ha*43.5)/xx
w:=(wa*3.5)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, mehr, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, mehr
GuiControl,1: , mehr, mehr...
GuiControl,1: show, mehr
; GuiControl,1: hide, mehr
; GuiControl,1: focus, mehr
GuiControl,1: disable, mehr
; GuiControl,1: enable, mehr
; //////////////////////////////////////////////////////////////////////////////////// button Markierte Einträge im trigger_listview Löschen
; Gui,1: Add, GroupBox , vMarkierteLöschen ; Maß nehmen
Gui,1: Add, button , vMarkierteLöschen Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*17.1)/xx
y:=(ha*43.5)/xx
w:=(wa*7.6)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, MarkierteLöschen, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, MarkierteLöschen
GuiControl,1: , MarkierteLöschen, Markierte löschen
GuiControl,1: show, MarkierteLöschen
; GuiControl,1: hide, MarkierteLöschen
; GuiControl,1: focus, MarkierteLöschen
; GuiControl,1: disable, MarkierteLöschen
; GuiControl,1: enable, MarkierteLöschen
; //////////////////////////////////////////////////////////////////////////////////// button trigger_listview Liste exportieren
; Gui,1: Add, GroupBox , vListeExportieren ; Maß nehmen
Gui,1: Add, button , vListeExportieren Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*9.3)/xx
y:=(ha*43.5)/xx
w:=(wa*7.4)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, ListeExportieren, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, ListeExportieren
GuiControl,1: , ListeExportieren, Liste exportieren
GuiControl,1: show, ListeExportieren
; GuiControl,1: hide, ListeExportieren
; GuiControl,1: focus, ListeExportieren
; GuiControl,1: disable, ListeExportieren
; GuiControl,1: enable, ListeExportieren
; //////////////////////////////////////////////////////////////////////////////////// button Liste importieren
; Gui,1: Add, GroupBox , vListeImportieren ; Maß nehmen
Gui,1: Add, button , vListeImportieren Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*1.5)/xx,
y:=(ha*43.5)/xx
w:=(wa*7.4)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, ListeImportieren, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, ListeImportieren
GuiControl,1: , ListeImportieren, Liste importieren
GuiControl,1: show, ListeImportieren
; GuiControl,1: hide, ListeImportieren
; GuiControl,1: focus, ListeImportieren
; GuiControl,1: disable, ListeImportieren
; GuiControl,1: enable, ListeImportieren
; ////////////////////////////////////////////////////////////////////////////////////
;-
Gui, Font, s%fs11% normal, ; Nächste System Aktion
x:=(wa*1)/xx, y:=(ha*47.5)/xx, w:=(wa*28)/xx, h:=(ha*4.2)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% cBLUE, %a_Space%Nächste System Aktion:%a_Space%
Gui, Font, s%fs11% normal, ; Nächste System Aktion
x:=(wa*2.5)/xx, y:=(ha*49.5)/xx, w:=(wa*26)/xx, h:=(ha*2.2)/xx
Gui, Add, text, x%x% y%y% w%w% h%h% vNächsteGeplanteAction cBLUE
;- GuiControl,, NächsteGeplanteAction,% MainArray["nextScheduledAction"]
;-
Gui, Font, s%fs11% normal, ; LOG
x:=(wa*1)/xx, y:=(ha*52.8)/xx, w:=(wa*28)/xx, h:=(ha*2.11)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% , %a_Space%Log:%a_Space%
;----------------------------------------------
Gui, Font, s%fs11% normal, ; GroupBox unter LOGListview
x:=(wa*1)/xx, y:=(ha*73.7)/xx, w:=(wa*28)/xx, h:=(ha*4.8)/xx
Gui, Add, GroupBox, x%x% y%y% w%w% h%h% vGroupBoxUnterLOGListview
;----------------------------------------------
; //////////////////////////////////////////////////////////////////////////////////// button Log Liste Exportieren
; Gui,1: Add, GroupBox , vLogListeExportieren ; Maß nehmen
Gui,1: Add, button , vLogListeExportieren Hidden
Gui,1: Font, s%fs10% normal
x:=(wa*19.5)/xx,
y:=(ha*75.2)/xx
w:=(wa*8.4)/xx
h:=(ha*2.6)/xx
GuiControl,1: MoveDraw, LogListeExportieren, x%x% y%y% w%w% h%h% ; default
GuiControl,1: Font, LogListeExportieren
GuiControl,1: , LogListeExportieren, Logdaten exportieren
GuiControl,1: show, LogListeExportieren
; GuiControl,1: hide, LogListeExportieren
; GuiControl,1: focus, LogListeExportieren
; GuiControl,1: disable, LogListeExportieren
; GuiControl,1: enable, LogListeExportieren
; ////////////////////////////////////////////////////////////////////////////////////
Gui, Font, s%fs9% normal, ;
x:=(wa*1)/xx, y:=(ha*54.8)/xx, w:=(wa*28)/xx, h:=(ha*20)/xx
Gui, Add, listview, x%x% y%y% w%w% h%h% vLV1 hwndhLV1 grid background%color% cBlack , Timestamp|ThisLabel|Name
T1:=(wa*1.9)/xx,T2:=(wa*1.9)/xx,T3:=(wa*6)/xx ; ,T4:=(wa*17)/xx
LV_ModifyCol(1,T1),LV_ModifyCol(2,T2),LV_ModifyCol(3,T3) ; ,LV_ModifyCol(4,T4)
; GuiControl,1: hide, LV1
; ////////////////////////////////////////////////////////////////////////////////////
;-
Gui, Font, s%fs11% normal,
x:=(wa*30)/xx, y:=(ha*1)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxB, %a_Space%Sonne%a_Space%
x:=(wa*30)/xx, y:=(ha*17)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxC, %a_Space%Mond%a_Space%
x:=(wa*30)/xx, y:=(ha*33)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxD, %a_Space%Wetter%a_Space%
x:=(wa*30)/xx, y:=(ha*49)/xx, w:=(wa*34)/xx, h:=(ha*15)/xx
Gui, Add, GroupBox,x%x% y%y% w%w% h%h% vGroupBoxE, %a_Space%Umwelt%a_Space%
;-
;----
; https://www.autohotkey.com/boards/viewtopic.php?p=39229#p39229
; Bildschirmbreite ermitteln, ZoomFaktor berechnen (100%=1920px)
; Berechnung der korrigierten Pixel als Variable Ln
loop, 2000
L%A_Index% := Round(A_Index * ZoomFactor, 0)
WinGetPos, X, Y, Width, SysWinHoehe, ahk_class Shell_TrayWnd
hoehe := L1080 - SysWinHoehe
showGUIzweiFULL := 0
if showGUIzweiFULL
{
;Gui, 1: -Border
;gui,show, x0 y0 w%L1920% h%A_screenHeight% ,% strReplace((substr(a_scriptname,-11)),".ahk")
gui,show, x0 y0 w%L1920% h%L1080% ,% strReplace((substr(a_scriptname,-11)),".ahk")
} else {
x:=(wa*29)/xx,y:=(ha*10)/xx,w:=(wa*65)/xx,h:=(ha*80)/xx
gui,show,x%x% y%y% w%w% h%h% ,% strReplace((substr(a_scriptname,-11)),".ahk")
}
GuiControl,1: Focus,LV1
return
guiclose:
exitapp
return
ListViewEinUndAusblenden: ;
gui, submit, nohide
;GuiControlGet, ListViewEinUndAusblenden
ListViewEinUndAusblenden := (ListViewEinUndAusblenden:=!ListViewEinUndAusblenden)
Return
Month(thisMonth) {
Month := strSplit("Jan,Feb,Mrz,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez",",")
return Month[thisMonth]
}
GeplanteTrigger:
;reload
msgbox,4096,% "Zeile:`t" a_lineNumber, Test geplanter Trigger, 4
return[/code]