-
Notifications
You must be signed in to change notification settings - Fork 34
/
playlist.txt
78 lines (61 loc) · 1.23 KB
/
playlist.txt
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Set screen size
screen "1080p";
# Create Coordinates
coords {
"center": {
"1080p": [960, 540],
"720p": [640, 360]
}
};
# Import playlist files
import "test/main.txt";
# Create a playlist
playlist "openChrome" {
# Run programs in the shell
shell "google-chrome";
sleep 2.0;
# Name the new window
active "hofChrome";
sleep 0.5;
# Use hotkeys to arrange
hotkeys "winleft" "right";
sleep 1;
};
playlist "closeChrome" {
# Focus a named window
focus "hofChrome";
hotkeys "alt" "f4";
sleep 1;
};
playlist "readTheDocs" {
# Go to a webpage
focus "hofChrome";
sleep 0.2;
# Type the URL
write "https://docs.hofstadter.io\n" 0.05;
# Goto an imported coordinate
coord "getting-started" 0.5;
};
# Move the mouse in a square
playlist "repeatTest" {
mm 100 100 1;
mm 1000 100 1;
mm 1000 500 1;
mm 100 500 1;
};
# Our main playlist
playlist "main" {
# Goto a named coordinate, also with offset
coord "center" 1;
coord "center" 250 -250 1;
# Operate the browser
play "openChrome";
play "readTheDocs";
play "closeChrome";
# Play a playlist multiple times
play "repeatTest" 4;
};
# Set the global delay between steps
delay 0.025;
# Finally, play our main playlist
play "main";