-
Notifications
You must be signed in to change notification settings - Fork 0
/
CincoFaceTimePartySnoozer.applescript
106 lines (59 loc) · 2.66 KB
/
CincoFaceTimePartySnoozer.applescript
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
(*
File: CincoFaceTimePartySnoozer.applescript
Version: 1.0
Abstract: This script will automatically reply in a convincing manner. Nobody will know you're actually asleep!
Instructions:
Add this file to your Messages' AppleScript folder. (/Users/username/Library/Application Scripts/com.apple.iChat)
Open Messages preferences, and select this script as AppleScript Handler at the bottom of the General Settings page.
Set your status to "Not Sleeping" to activate.
Note: Messages will not auto-reply in any actively focused window. You should open any other program or leave your buddy list as the active window.
*)
using terms from application "Messages"
on received text invitation theText from theBuddy for theChat
accept theChat
end received text invitation
on message received theMessage from theBuddy for theChat
if theChat's service's status message is equal to "Not Sleeping" then
set myList to {"I understand.", "Okay.", "Thanks for coming.", "Sure why not.", "Sounds good."}
set myPhrase to some item of myList
send myPhrase to theChat
end if
end message received
# The following are unused but need to be defined to avoid an error
on received audio invitation theText from theBuddy for theChat
end received audio invitation
on received video invitation theText from theBuddy for theChat
end received video invitation
on received remote screen sharing invitation from theBuddy for theChat
end received remote screen sharing invitation
on received local screen sharing invitation from theBuddy for theChat
end received local screen sharing invitation
on received file transfer invitation theFileTransfer
end received file transfer invitation
on buddy authorization requested theRequest
end buddy authorization requested
on message sent theMessage for theChat
end message sent
on chat room message received theMessage from theBuddy for theChat
end chat room message received
on active chat message received theMessage
end active chat message received
on addressed chat room message received theMessage from theBuddy for theChat
end addressed chat room message received
on addressed message received theMessage from theBuddy for theChat
end addressed message received
on av chat started
end av chat started
on av chat ended
end av chat ended
on login finished for theService
end login finished
on logout finished for theService
end logout finished
on buddy became available theBuddy
end buddy became available
on buddy became unavailable theBuddy
end buddy became unavailable
on completed file transfer
end completed file transfer
end using terms from