forked from ZekeSnider/Jared
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJared.applescript
More file actions
executable file
·110 lines (91 loc) · 3.46 KB
/
Jared.applescript
File metadata and controls
executable file
·110 lines (91 loc) · 3.46 KB
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
107
108
109
110
using terms from application "Messages"
on message sent theMessage for theChat with eventDescription
(*
set getname to ""
set gethandle to ""
try
set myresult to get id of theChat
on error errMsg
set errMsgParts to splitText(errMsg, "\"")
set errCount to count of errMsgParts
set myresult to item (errCount - 1) of errMsgParts
end try
tell application "JaredUI"
received with message theMessage from buddy getname with buddyHandle gethandle in group myresult
end tell*)
end message sent
on message received theText from theBuddy with eventDescription
set getname to first name of theBuddy as text
try
set myresult to get id of theBuddy
on error errMsg
set errMsgParts to splitText(errMsg, "\"")
set errCount to count of errMsgParts
set myresult to item (errCount - 1) of errMsgParts
end try
tell application "JaredUI"
received with message theText from buddy getname in group myresult
end tell
end message received
on chat room message received theText with eventDescription from theBuddy for theChat
set getname to first name of theBuddy as text
set gethandle to handle of theBuddy as text
try
set myresult to get id of theChat
on error errMsg
set errMsgParts to splitText(errMsg, "\"")
set errCount to count of errMsgParts
set myresult to item (errCount - 1) of errMsgParts
end try
tell application "JaredUI"
received with message theText from buddy getname with gethandle in group myresult
end tell
end chat room message received
on active chat message received theText with eventDescription from theBuddy for theChat
end active chat message received
on addressed message received theText with eventDescription from theBuddy for theChat
set getname to first name of theBuddy as text
try
set myresult to get id of theChat
on error errMsg
set errMsgParts to splitText(errMsg, "\"")
set errCount to count of errMsgParts
set myresult to item (errCount - 1) of errMsgParts
end try
tell application "JaredUI"
received with message theText from buddy getname in group myresult
end tell
end addressed message received
on received text invitation with eventDescription
end received text invitation
on received audio invitation theText from theBuddy for theChat with eventDescription
end received audio invitation
on received video invitation theText from theBuddy for theChat with eventDescription
end received video invitation
on buddy authorization requested with eventDescription
end buddy authorization requested
on addressed chat room message received with eventDescription
end addressed chat room message received
on login finished with eventDescription
end login finished
on logout finished with eventDescription
end logout finished
on buddy became available with eventDescription
end buddy became available
on buddy became unavailable with eventDescription
end buddy became unavailable
on received file transfer invitation theFileTransfer with eventDescription
end received file transfer invitation
on av chat started with eventDescription
end av chat started
on av chat ended with eventDescription
end av chat ended
on completed file transfer with eventDescription
end completed file transfer
end using terms from
on splitText(sourceText, textDelimiter)
set AppleScript's text item delimiters to {textDelimiter}
set messageParts to (every text item in sourceText) as list
set AppleScript's text item delimiters to ""
return messageParts
end splitText