-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_dsa_data_tomorrow.ahk
56 lines (41 loc) · 1.28 KB
/
get_dsa_data_tomorrow.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
SetKeyDelay, 1000
CoordMode, Mouse, Client
get_tom_dsa()
get_tom_dsa(st := 0, en := 0){
start_date := ""
end_date := ""
EnvAdd, start_date, %st%, Days
EnvAdd, end_date, %en%, Days
mess := st "___" start_date "____" en "________" end_date
FormatTime, start_day, %start_date%, dd ; get single elements of start and end date
FormatTime, start_month, %start_date%, MM
FormatTime, start_year, %start_date%, YYYY
FormatTime, end_day, %end_date%, dd
FormatTime, end_month, %end_date%, MM
FormatTime, end_year, %end_date%, YYYY
FormatTime, save_start_date, %start_date%, yyyy_MM_dd
FormatTime, save_end_date, %end_date%, yyyy_MM_dd
f_name := "H:\Abteilung Verwaltung\daily_dashboard\pdfs\" save_start_date ".pdf"
if FileExist(f_name)
{
FileDelete, %f_name%
}
; MsgBox,,,test,1 ; unkown reason does not register key presses in termin planer
SetKeyDelay, 1000
WinActivate, Terminplan - Terminplanung
WinMaximize, Terminplan - Terminplanung
Sleep, 1500
MouseClick, Left, 414, 25 ; clicks in termin planer to prepare for keystrokes
MouseClick, l, 457, 68 ; pick dsa
Sleep, 5000
MouseClick, l, 1132, 121 ; click today
Sleep, 5000
Send, ^p
Send, `n
WinWait, Druckausgabe speichern unter
Sleep, 300
SetKeyDelay, 100
Send, %f_name%
SetKeyDelay, 1000
Send, `n
}