Add support for calling AppleScript (#39)
Closed
Andrzej Wójcik (Tigase) opened 6 years ago

It would be nice to be able to call AppleScript from the conversation window, ie. to retrieve additional details from the external system.

Hello World 1.applescript Hello World 2.applescript

Andrzej Wójcik (Tigase) commented 6 years ago

I've added support to call AppleScript scripts from the BeagleIM, but first, you need to create those scripts. I've attached 2 sample scripts which you can use as examples.

When you have your scripts ready you should put them in ~/Libraries/Application Scripts/org.tigase.messenger.BeagleIM/contact/ directory. contact is a group for scripts which will work on "contact" (they accept JID and contact name from the roster if available).

Name of the script file is used as a name of the entry displayed in the "Scripts" menu in the conversation view. I would recommend making those names short but meaningful and checking "Hide suffixes" on the file, to make sure that the "extension" of the file will not be displayed as part of the menu entry label.

Scripts are checked on the startup of BeagleIM, so if you add new scripts they will not appear until restart of the app. However, if you will modify the script, then BeagleIM will execute the updated version.

Please check if and how well it works for you. I know there is no UI for editing scripts, etc. but I suppose this is good enough, to test if it is useful or not. Please keep in mind that execution of AppleScript may block Beagle IM (may behave same as the modal window).

Artur Hefczyc commented 6 years ago

Works for me, great!! From my side the task can be closed. Once I start using the feature more, I will most likely have some requests but will open them as new tickets.

By the way, one important thing.

Our packages do not start with "org.tigase....." This "org" part should be removed. All our packages start with just "tigase".

%bmalkow please make sure you do not use the org part either.

Bartosz Małkowski commented 6 years ago

I'm using org.tigase in Android Messenger. Unfortunately I'm not able to change it now. Maybe during rebranding.

Andrzej Wójcik (Tigase) commented 6 years ago

%kobit As for the iOS and macOS, it is not possible to change "package" because there is no package in Swift. What you can see for iOS and macOS is bundle id and those were registered in the AppStore and those cannot be changed unless we will release a new application! This means that old users will not get updates automatically, we will not be able to transfer account credentials, message history, and application settings.

I understand that you do not want to have "org.tigase." in packages as those are used in other projects in Java in imports, etc. But Swift has a different way of naming "frameworks"(libraries) and importing them.

Due to the above, I'm reluctant to make changes to the bundle identifiers in the AppStore, unless there is a really important matter - ie. copyright infringement or something like that.

Also please note, that this bundle id is not exposed to the user in any way. You've seen it (for the first time now), when you wanted to add a custom addon to the application.

Artur Hefczyc commented 6 years ago

Andrzej Wójcik wrote:

%kobit As for the iOS and macOS, it is not possible to change "package" because there is no package in Swift. What you can see for iOS and macOS is bundle id and those were registered in the AppStore and those cannot be changed unless we will release a new application! This means that old users will not get updates automatically, we will not be able to transfer account credentials, message history, and application settings.

Ok, let's leave the org in current applications. Just remember to not use it in the future.

I understand that you do not want to have "org.tigase." in packages as those are used in other projects in Java in imports, etc. But Swift has a different way of naming "frameworks"(libraries) and importing them.

No. We do not use "org.tigase" in Java imports either. If we do somewhere, then it should be changed too.

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
8620
Version
3.0
Spent time
12h
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/beagle-im#39
Please wait...
Page is in error, reload to recover