Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Name Commands #18

Merged
merged 37 commits into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
151b199
Add name commands
ZekeSnider Jul 14, 2017
dc9c78c
Remove unnecessary print
ZekeSnider Jul 14, 2017
c43c942
Send message if no permissions for contacts
ZekeSnider Jul 14, 2017
faed1ca
Added realm
ZekeSnider Jul 15, 2017
ae34c4e
Moved name command to core module + update scpt
ZekeSnider Jul 18, 2017
03dfeef
Update version number
ZekeSnider Jul 18, 2017
91a6bf2
Add disable/enable
ZekeSnider Jul 18, 2017
4d0fd6f
Fix adding new contacts
ZekeSnider Jul 18, 2017
a44023e
Added first config file
ZekeSnider Jul 18, 2017
fea1e57
Fix parameter validation for /send
Aug 11, 2017
07cc9df
Add rate limiting for number of concurrent /sends
ZekeSnider Aug 11, 2017
52417b1
Fix warnings
ZekeSnider Aug 11, 2017
63562a7
Fix more warnings
ZekeSnider Aug 11, 2017
33ba29f
/disable will now disable output of all commands
ZekeSnider Aug 11, 2017
9d8aff0
Added touchbar support for enable/disable
ZekeSnider Aug 11, 2017
10c9a7f
Text field extension to override default touchbar
ZekeSnider Aug 11, 2017
15afddd
Keep Touch Bar button in sync
ZekeSnider Aug 11, 2017
ebbd1bd
Add touchbar button for opening plugin directory
ZekeSnider Aug 12, 2017
a1dd69f
Add plugin reload touchbar button and fix /send
ZekeSnider Aug 13, 2017
57252ab
Add message scheduling
ZekeSnider Oct 25, 2017
014973e
Changes to realm file
ZekeSnider Oct 25, 2017
64ac4ba
Swift 4 Update
ZekeSnider Oct 25, 2017
fca4e6b
macOS
ZekeSnider Oct 31, 2017
32a77a8
Write conig file if not exists
ZekeSnider Oct 31, 2017
27a6f24
Add buttons to preferences pane
ZekeSnider Oct 31, 2017
007b212
Check in old WIP
ZekeSnider Feb 21, 2018
b962005
Add to simple install
ZekeSnider Feb 21, 2018
846e8dc
Add switching for single user chats
ZekeSnider Feb 21, 2018
a74a3e1
Fix compile issues
ZekeSnider Feb 21, 2018
d361726
Fix build warnings, update podfile
ZekeSnider Feb 25, 2018
9c89686
Update readme
ZekeSnider Feb 25, 2018
ddc4ab5
Update readme & fix for contact checking with null
ZekeSnider Feb 25, 2018
34464cd
Fix TouchBar controlls and update readme
ZekeSnider Mar 1, 2018
0caf928
Added config sample
ZekeSnider Mar 1, 2018
03fc647
Make non-functional button disabled.
ZekeSnider Mar 1, 2018
73e0488
Bump version number
ZekeSnider Mar 1, 2018
a4b3037
Update readme, bump version
ZekeSnider Mar 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

*.ss~
*.ss#*
.#*.ss

*.scm~
*.scm#*
.#*.scm

## Build generated
build/
DerivedData/
Expand All @@ -16,6 +24,8 @@ DerivedData/
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xcuserstate
.DS_STORE

## Other
*.moved-aside
Expand Down
110 changes: 110 additions & 0 deletions Jared.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
Binary file removed Jared.scpt
Binary file not shown.
Loading